import request from '@/utils/request'

// 查询个人所有课程
export function getMyCourse() {
  return request({
    url: '/labbooking/course/getCourse',
    method: 'get'
  })
}

// 查询课程信息列表
export function listCourse(query) {
  return request({
    url: '/labbooking/course/list',
    method: 'get',
    params: query
  })
}

// 查询课程信息详细
export function getCourse(id) {
  return request({
    url: '/labbooking/course/' + id,
    method: 'get'
  })
}

// 新增课程信息
export function addCourse(data) {
  return request({
    url: '/labbooking/course',
    method: 'post',
    data: data
  })
}

// 修改课程信息
export function updateCourse(data) {
  return request({
    url: '/labbooking/course',
    method: 'put',
    data: data
  })
}

// 删除课程信息
export function delCourse(id) {
  return request({
    url: '/labbooking/course/' + id,
    method: 'delete'
  })
}

// 导出个人课程信息
export function exportCourse(query) {
  return request({
    url: '/labbooking/course/export',
    method: 'get',
    params: query
  })
}