import service from '@/utils/request'

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

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

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

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

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

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