import service from '@/utils/request'

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

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

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

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

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

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