import request from '@/utils/request'

// 查询试卷列表
export function listTestPaper(query) {
  return request({
    url: '/school-paper/testPaper/list',
    method: 'get',
    params: query
  })
}

// 查询试卷详细
export function getTestPaper(id) {
  return request({
    url: '/school-paper/testPaper/' + id,
    method: 'get'
  })
}
// 新增试卷
export function addTestPaper(data) {
  return request({
    url: '/school-paper/testPaper/randomGeneration',
    method: 'post',
    data: data
  })
}

// 修改试卷
export function updateTestPaper(data) {
  return request({
    url: '/school-paper/testPaper',
    method: 'put',
    data: data
  })
}

// 删除试卷
export function delTestPaper(id) {
  return request({
    url: '/school-paper/testPaper/' + id,
    method: 'delete'
  })
}

// 查询题库主列表
export function questionType(query) {
  return request({
    url: '/school-paper/question-type/list',
    method: 'get',
    params: query
  })
}
