import request from '@/utils/request'

// 创建车辆品牌型号
export function createCarModel(data) {
  return request({
    url: '/base/carModel/create',
    method: 'post',
    data: data
  })
}

// 更新车辆品牌型号
export function updateCarModel(data) {
  return request({
    url: '/base/carModel/update',
    method: 'put',
    data: data
  })
}

// 删除车辆品牌型号
export function deleteCarModel(id) {
  return request({
    url: '/base/carModel/delete?id=' + id,
    method: 'delete'
  })
}

// 获得车辆品牌型号
export function getCarModel(id) {
  return request({
    url: '/base/carModel/get?id=' + id,
    method: 'get'
  })
}

// 获得车辆品牌型号分页
export function getCarModelPage(params) {
  return request({
    url: '/base/carModel/page',
    method: 'get',
    params
  })
}
// 导出车辆品牌型号 Excel
export function exportCarModelExcel(params) {
  return request({
    url: '/base/carModel/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
