import service from '@/utils/request'

// @Tags UnitUser
// @Summary 创建UnitUser
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.UnitUser true "创建UnitUser"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /unitUser/createUnitUser [post]
export const createUnitUser = (data) => {
  return service({
    url: '/unitUser/createUnitUser',
    method: 'post',
    data
  })
}

// @Tags UnitUser
// @Summary 删除UnitUser
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.UnitUser true "删除UnitUser"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /unitUser/deleteUnitUser [delete]
export const deleteUnitUser = (data) => {
  return service({
    url: '/unitUser/deleteUnitUser',
    method: 'delete',
    data
  })
}

// @Tags UnitUser
// @Summary 删除UnitUser
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除UnitUser"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /unitUser/deleteUnitUser [delete]
export const deleteUnitUserByIds = (data) => {
  return service({
    url: '/unitUser/deleteUnitUserByIds',
    method: 'delete',
    data
  })
}

// @Tags UnitUser
// @Summary 更新UnitUser
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.UnitUser true "更新UnitUser"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /unitUser/updateUnitUser [put]
export const updateUnitUser = (data) => {
  return service({
    url: '/unitUser/updateUnitUser',
    method: 'put',
    data
  })
}

// @Tags UnitUser
// @Summary 用id查询UnitUser
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.UnitUser true "用id查询UnitUser"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /unitUser/findUnitUser [get]
export const findUnitUser = (params) => {
  return service({
    url: '/unitUser/findUnitUser',
    method: 'get',
    params
  })
}

// @Tags UnitUser
// @Summary 分页获取UnitUser列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取UnitUser列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /unitUser/getUnitUserList [get]
export const getUnitUserList = (params) => {
  return service({
    url: '/unitUser/getUnitUserList',
    method: 'get',
    params
  })
}
