import request from '@/utils/request'

// 查询拼桌列表
export function listTeam(query) {
  return request({
    url: '/bst/team/list',
    method: 'get',
    params: query
  })
}

// 查询拼桌详细
export function getTeam(id) {
  return request({
    url: '/bst/team/' + id,
    method: 'get'
  })
}

// 新增拼桌
export function addTeam(data) {
  return request({
    url: '/bst/team',
    method: 'post',
    data: data
  })
}

// 修改拼桌
export function updateTeam(data) {
  return request({
    url: '/bst/team',
    method: 'put',
    data: data
  })
}

// 删除拼桌
export function delTeam(id) {
  return request({
    url: '/bst/team/' + id,
    method: 'delete'
  })
}

// 强制解散拼桌
export function forcedDis(teamId) {
  return request({
    url: `/bst/team/forcedDis`,
    method: 'put',
    params : {teamId:teamId}
  })
}
