import request from '@/utils/request'

// 查询卫生间列表
export function listToilet(query) {
  return request({
    url: '/system/toilet/list',
    method: 'get',
    params: query
  })
}

// 查询卫生间详细
export function getToilet(toiletId) {
  return request({
    url: '/system/toilet/' + toiletId,
    method: 'get'
  })
}

// 新增卫生间
export function addToilet(data) {
  return request({
    url: '/system/toilet',
    method: 'post',
    data: data
  })
}

// 修改卫生间
export function updateToilet(data) {
  return request({
    url: '/system/toilet',
    method: 'put',
    data: data
  })
}

// 删除卫生间
export function delToilet(toiletId) {
  return request({
    url: '/system/toilet/' + toiletId,
    method: 'delete'
  })
}
