import request from '@/utils/request'

// 查询子试题列表
export function listSubquestions(query) {
  return request({
    url: '/back/subquestions/list',
    method: 'get',
    params: query
  })
}

// 查询子试题详细
export function getSubquestions(id) {
  return request({
    url: '/back/subquestions/' + id,
    method: 'get'
  })
}

// 新增子试题
export function addSubquestions(data) {
  return request({
    url: '/back/subquestions',
    method: 'post',
    data: data
  })
}

// 修改子试题
export function updateSubquestions(data) {
  return request({
    url: '/back/subquestions',
    method: 'put',
    data: data
  })
}

// 删除子试题
export function delSubquestions(id) {
  return request({
    url: '/back/subquestions/' + id,
    method: 'delete'
  })
}

// 导出子试题
export function exportSubquestions(query) {
  return request({
    url: '/back/subquestions/export',
    method: 'get',
    params: query
  })
}
