import request from '@/utils/request'

// 查询题库列表
export function listCourseQuestionBank(query) {
  return request({
    url: '/course/courseQuestionBank/list',
    method: 'get',
    params: query
  })
}

// 查询题库详细
export function getCourseQuestionBank(id) {
  return request({
    url: '/course/courseQuestionBank/' + id,
    method: 'get'
  })
}

// 新增题库
export function addCourseQuestionBank(data) {
  return request({
    url: '/course/courseQuestionBank',
    method: 'post',
    data: data
  })
}

// 修改题库
export function updateCourseQuestionBank(data) {
  return request({
    url: '/course/courseQuestionBank',
    method: 'put',
    data: data
  })
}

// 删除题库
export function delCourseQuestionBank(id) {
  return request({
    url: '/course/courseQuestionBank/' + id,
    method: 'delete'
  })
}

// 导出题库
export function exportCourseQuestionBank(query) {
  return request({
    url: '/course/courseQuestionBank/export',
    method: 'get',
    params: query
  })
}

// 下载模板
export function importTemplate() {
  return request({
    url: '/course/courseQuestionBank/importTemplate',
    method: 'get'
  })
}

// 根据ids查询
export function getByIds(query) {
  return request({
    url: '/course/courseQuestionBank/getByIds',
    method: 'get',
    params: query
  })
}
