import http from '@/utils/request'

/* --------------场次管理--------------------- */
export function getBatchConfigList ({ name, pageNum = 1, pageSize = 999 }) {
  return http.post(`/admin/batchConfig/list`, { data: { name, pageNum, pageSize } })
}

export function updateBatchConfig (params) {
  return http.post(`/admin/batchConfig/update`, { data: params })
}

export function saveBatchConfig (params) {
  return http.post(`/admin/batchConfig/save`, { data: params })
}

export function deleteBatchConfig (params) {
  return http.post(`/admin/batchConfig/delete`, { data: params })
}

export function getBatchTicketList ({ batchId, tagId }) {
  return http.post(`/batchConfig/getBatchConfigTicketTypeList/${batchId}/${tagId || 0}`)
}

export function addBatchConfigSeatAreaTicketType (params) {
  return http.post(`/batchConfig/addBatchConfigSeatAreaTicketType`, { data: params })
}

export function getBatchConfigSeatAreaTicketType (params) {
  return http.post(`/batchConfig/getBatchConfigSeatAreaTicketType`, { data: params })
}

export function getBatchSeat (params) {
  return http.post(`/seatBatch/list`, { data: params })
}
export function updateBatchSeat (params) {
  return http.post(`/seatBatch/update`, { data: params })
}

export function getBatchList (params) {
  return http.post(`/admin/batch/getBatchList`, { data: params })
}

export function updateBatch (params) {
  return http.post(`/admin/batch/updateBatch`, { data: params })
}
