import request from '@/utils/request'

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

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

// 新增拼桌用户
export function addTeamUser(data) {
  return request({
    url: '/bst/teamUser',
    method: 'post',
    data: data
  })
}

// 修改拼桌用户
export function updateTeamUser(data) {
  return request({
    url: '/bst/teamUser',
    method: 'put',
    data: data
  })
}

// 删除拼桌用户
export function delTeamUser(id) {
  return request({
    url: '/bst/teamUser/' + id,
    method: 'delete'
  })
}

// 强制踢出用户
export function kick(teamId,userId) {
  return request({
    url: '/bst/teamUser/kick',
    method: 'put',
    params :{
      teamId:teamId,
      userId:userId
    }
  })
}
