import request from '@/utils/request'

// 查询卡座列表
export function listBooth(query) {
  return request({
    url: '/bst/booth/list',
    method: 'get',
    params: query
  })
}

// 查询卡座详细
export function getBooth(boothId) {
  return request({
    url: '/bst/booth/' + boothId,
    method: 'get'
  })
}

// 新增卡座
export function addBooth(data) {
  return request({
    url: '/bst/booth',
    method: 'post',
    data: data
  })
}

// 修改卡座
export function updateBooth(data) {
  return request({
    url: '/bst/booth',
    method: 'put',
    data: data
  })
}

// 删除卡座
export function delBooth(boothId) {
  return request({
    url: '/bst/booth/' + boothId,
    method: 'delete'
  })
}


// 设备绑定卡座
export function bindBooth(device,boothId) {
  return request({
    url: `/bst/booth/bindBooth/?boothId=${boothId}`,
    method: 'put',
    data: device
  })
}


// 设备卡座解绑
export function unbindBooth(device,boothId) {
  return request({
    url: `/bst/booth/unbindBooth/?boothId=${boothId}`,
    method: 'put',
    data: device
  })
}

