import request from '@/utils/request'

/** 我的报名详情（须已报名） */
export function getMyEnrollDetail(id) {
  return request({
    url: `/app/practicalTraining/myEnroll/${id}`,
    method: 'GET',
    silent: true
  })
}

/** 我的报名分页列表 */
export function listMyEnroll(params) {
  return request({
    url: '/app/practicalTraining/myEnroll/list',
    method: 'GET',
    params
  })
}

/** 立即报名 */
export function enrollPracticalTraining(id) {
  return request({
    url: `/app/practicalTraining/${id}/enroll`,
    method: 'POST'
  })
}

/** 取消报名 */
export function cancelEnrollPracticalTraining(id) {
  return request({
    url: `/app/practicalTraining/${id}/cancelEnroll`,
    method: 'POST'
  })
}
