import request from '@/utils/request'
/* 建筑管理 */
/* 建筑物管理 */
export function addBuilding(data) {
    return request({
        url: "/building",
        method: 'post',
        data: data
    })
}

export function delBuilding(data) {
    return request({
        url: "/building/" + data,
        method: 'delete',
    })
}
export function updateBuilding(data) {
    return request({
        url: "/building",
        method: 'put',
        data: data
    })
}
export function getBuilding(data) {
    return request({
        url: "/building/list",
        method: 'get',
        params: data
    })
}


/* 楼层管理 */
export function addFloor(data) {
    return request({
        url: "/floor",
        method: 'post',
        data: data
    })
}

export function delFloor(data) {
    return request({
        url: "/floor/" + data,
        method: 'delete',
    })
}
export function updateFloor(data) {
    return request({
        url: "/floor",
        method: 'put',
        data: data
    })
}
export function getFloor(data) {
    return request({
        url: "/floor/list",
        method: 'get',
        params: data
    })
}



/* 房间管理 */
export function addRoom(data) {
    return request({
        url: "/room",
        method: 'post',
        data: data
    })
}

export function delRoom(data) {
    return request({
        url: "/room/" + data,
        method: 'delete',
    })
}
export function updateRoom(data) {
    return request({
        url: "/room",
        method: 'put',
        data: data
    })
}
export function getRoom(data) {
    return request({
        url: "/room/list",
        method: 'get',
        params: data
    })
}