import service from '@/utils/request'

// 创建停车区域
export const addPullOver = (data) => {
    return service({
        url: '/parking/lot/create',
        method: 'post',
        data
    })
}

// 更新停车区域
export const editPullOver = (data) => {
    return service({
        url: '/parking/lot/update',
        method: 'put',
        data
    })
}

// 根据ID获取停车区域
export const obtainPullOverId = (id) => {
    return service({
        url: '/parking/lot/get?id=' + id,
        method: 'get'
    })
}

// 根据编码获取停车区域
export const obtainPullOverCode = (code) => {
    return service({
        url: '/parking/lot/get-by-code?code=' + code,
        method: 'get'
    })
}

// 获取停车区域列表
export const obtainPullOverList = (params) => {
    return service({
        url: '/parking/lot/list',
        method: 'get',
        params
    })
}

// 删除停车区域
export const removePullOver = (id) => {
    return service({
        url: '/parking/lot/delete?id=' + id,
        method: 'delete',
    })
}
