import request from '@/utils/request'

// 查询车辆故障列表
export function listBreakdown(query) {
  return request({
    url: '/breakdown/breakdown/list',
    method: 'get',
    params: query
  })
}

// 查询车辆故障详细
export function getBreakdown(id) {
  return request({
    url: '/breakdown/breakdown/' + id,
    method: 'get'
  })
}

// 新增车辆故障
export function addBreakdown(data) {
  return request({
    url: '/breakdown/breakdown',
    method: 'post',
    data: data
  })
}

// 修改车辆故障
export function updateBreakdown(data) {
  return request({
    url: '/breakdown/breakdown',
    method: 'put',
    data: data
  })
}

// 删除车辆故障
export function delBreakdown(id) {
  return request({
    url: '/breakdown/breakdown/' + id,
    method: 'delete'
  })
}
