import request from '@/utils/request'

// 查询维修原因列表
export function listMaintainCause(query) {
  return request({
    url: '/business/maintainCause/list',
    method: 'get',
    params: query
  })
}

// 查询维修原因详细
export function getMaintainCause(id) {
  return request({
    url: '/business/maintainCause/' + id,
    method: 'get'
  })
}

// 新增维修原因
export function addMaintainCause(data) {
  return request({
    url: '/business/maintainCause',
    method: 'post',
    data: data
  })
}

// 修改维修原因
export function updateMaintainCause(data) {
  return request({
    url: '/business/maintainCause',
    method: 'put',
    data: data
  })
}

// 删除维修原因
export function delMaintainCause(id) {
  return request({
    url: '/business/maintainCause/' + id,
    method: 'delete'
  })
}
