import request from '@/utils/request'

const base = '/live/trainingCamp'

// 训练营
export function listTrainingCamp(query) {
  return request({ url: base + '/camp/list', method: 'get', params: query })
}
export function getTrainingCamp(campId) {
  return request({ url: base + '/camp/' + campId, method: 'get' })
}
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) {
  return request({ url: base + '/camp/' + campIds, method: 'delete' })
}

// 营期
export function listTrainingPeriod(query) {
  return request({ url: base + '/period/list', method: 'get', params: query })
}
export function getTrainingPeriod(periodId) {
  return request({ url: base + '/period/' + periodId, method: 'get' })
}
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) {
  return request({ url: base + '/period/' + periodIds, method: 'delete' })
}

// 营期下直播间
export function listTrainingLive(query) {
  return request({ url: base + '/live/list', method: 'get', params: query })
}
export function addTrainingLive(data) {
  return request({ url: base + '/live', method: 'post', data })
}
