import request from '@/utils/request'

// 训练营列表
export function listCamp(query) {
  return request({
    url: '/course/trainingCamp/list',
    method: 'get',
    params: query
  })
}

// 新增训练营
export function addCamp(data) {
  return request({
    url: '/course/trainingCamp',
    method: 'post',
    data: data
  })
}

// 修改训练营
export function editCamp(data) {
  return request({
    url: '/course/trainingCamp',
    method: 'put',
    data: data
  })
}

// 删除训练营
export function delCamp(trainingCampId) {
  return request({
    url: `/course/trainingCamp/${trainingCampId}`,
    method: 'delete'
  })
}

// 复制训练营
export function copyCamp(trainingCampId) {
  return request({
    url: `/course/trainingCamp/copy/${trainingCampId}`,
    method: 'post'
  })
}

// 获取训练营选项列表
export function getCampListLikeName(query) {
  return request({
    url: '/course/trainingCamp/getCampListLikeName',
    method: 'get',
    params: query
  })
}

