import request from '@/utils/request'

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

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

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

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

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