import service from '@/utils/request'
// 新增车辆信息
export const addCarInfo = (data) => {
    return service({
        url: '/vehicle/create',
        method: 'post',
        data
    })
}

// 编辑车辆信息
export const editCarInfo = (data) => {
    return service({
        url: '/vehicle/update',
        method: 'put',
        data
    })
}

// 根据ID获取车辆信息
export const carInfoId = (id) => {
    return service({
        url: '/vehicle/get?id=' + id,
        method: 'get'
    })
}

// 根据车牌号获取车辆信息
export const carInfoPhone = (num) => {
    return service({
        url: '/vehicle/get-by-plate?plate_number=' + num,
        method: 'get'
    })
}

// 获取车辆列表
export const obtainCarInfoList = (params) => {
    return service({
        url: '/vehicle/list',
        method: 'get',
        params
    })
}

// 删除车辆
export const removeCarInfo = (id) => {
    return service({
        url: '/vehicle/delete?id=' + id,
        method: 'delete',
    })
}

