import request from '@/utils/request'

// 查询保险管理列表
export function listInsurance(query) {
  return request({
    url: '/drivingSchool/system/insurance/list',
    method: 'get',
    params: query
  })
}

// 查询保险管理详细
export function getInsurance(id) {
  return request({
    url: '/drivingSchool/system/insurance/' + id,
    method: 'get'
  })
}

// 查询车辆列表
export function listCards(query) {
  return request({
    url: '/drivingSchool/system/car/listAll',
    method: 'get',
    params: query
  })
}

// 新增保险管理
export function addInsurance(data) {
  return request({
    url: '/drivingSchool/system/insurance',
    method: 'post',
    data: data
  })
}

// 修改保险管理
export function updateInsurance(data) {
  return request({
    url: '/drivingSchool/system/insurance',
    method: 'put',
    data: data
  })
}

// 删除保险管理
export function delInsurance(id) {
  return request({
    url: '/drivingSchool/system/insurance/' + id,
    method: 'delete'
  })
}
