import service from '@/utils/request'

// 创建岗亭
export const addGuardBooth = (data) => {
    return service({
        url: '/parking/booth/create',
        method: 'post',
        data
    })
}

// 更新岗亭
export const editGuardBooth = (data) => {
    return service({
        url: '/parking/booth/update',
        method: 'put',
        data
    })
}

// 根据ID获取岗亭
export const obtainGuardBoothId = (id) => {
    return service({
        url: '/parking/booth/get?id=' + id,
        method: 'get'
    })
}
// 根据编码获取岗亭
export const obtainGuardBoothCode = (code) => {
    return service({
        url: '/parking/booth/get-by-code?code=' + code,
        method: 'get',
    })
}

// 获取岗亭列表
export const obtainGuardBoothList = (params) => {
    return service({
        url: '/parking/booth/list',
        method: 'get',
        params
    })
}

// 删除岗亭
export const deleteGuardBooth = (id) => {
    return service({
        url: '/parking/booth/delete?id=' + id,
        method: 'delete'
    })
}
