import request from '@/utils/request'

// 查询教练列表
export function listInfo(query) {
  return request({
    url: '/coach/info/list',
    method: 'get',
    params: query
  })
}

// 查询教练详细
export function getInfo(coachnum) {
  return request({
    url: '/coach/info/' + coachnum,
    method: 'get'
  })
}

// 新增教练
export function addInfo(data) {
  return request({
    url: '/coach/info',
    method: 'post',
    data: data
  })
}

// 修改教练
export function updateInfo(data) {
  return request({
    url: '/coach/info',
    method: 'put',
    data: data
  })
}

// 删除教练
export function delInfo(coachnum) {
  return request({
    url: '/coach/info/' + coachnum,
    method: 'delete'
  })
}

// 导出教练
export function exportInfo(query) {
  return request({
    url: '/coach/info/export',
    method: 'get',
    params: query
  })
}