import request from '@/utils/request'

const base = '/live/trainingCamp/admin'

export function listTrainingCamp(query) {
  return request({ url: base + '/camp/list', method: 'get', params: query })
}

export function getTrainingCamp(campId, companyId) {
  return request({ url: base + '/camp/' + campId, method: 'get', params: { companyId } })
}

export function addTrainingCamp(data) {
  return request({ url: base + '/camp', method: 'post', data })
}

export function updateTrainingCamp(data) {
  return request({ url: base + '/camp', method: 'put', data })
}

export function delTrainingCamp(campIds, companyId) {
  return request({ url: base + '/camp/' + campIds, method: 'delete', params: { companyId } })
}

export function listTrainingPeriod(query) {
  return request({ url: base + '/period/list', method: 'get', params: query })
}

export function getTrainingPeriod(periodId, companyId) {
  return request({ url: base + '/period/' + periodId, method: 'get', params: { companyId } })
}

export function addTrainingPeriod(data) {
  return request({ url: base + '/period', method: 'post', data })
}

export function updateTrainingPeriod(data) {
  return request({ url: base + '/period', method: 'put', data })
}

export function delTrainingPeriod(periodIds, companyId) {
  return request({ url: base + '/period/' + periodIds, method: 'delete', params: { companyId } })
}

export function listTrainingLive(query) {
  return request({ url: base + '/live/list', method: 'get', params: query })
}

export function addTrainingLive(data, companyId) {
  return request({ url: base + '/live', method: 'post', params: { companyId }, data })
}

/** 训练营直播间审核列表 */
export function listTrainingLiveAudit(query) {
  return request({ url: base + '/live/auditList', method: 'get', params: query })
}

export function auditTrainingLive(data) {
  return request({ url: base + '/live/audit', method: 'put', data })
}
