import request from '@/utils/request'

// 查询题库分类列表
export function listSubjectWarehouseClass(query) {
  return request({
    url: '/hezhi/subjectWarehouseClass/list',
    method: 'get',
    params: query
  })
}

// 查询题库分类详细
export function getSubjectWarehouseClass(subjectWarehouseClassId) {
  return request({
    url: '/hezhi/subjectWarehouseClass/' + subjectWarehouseClassId,
    method: 'get'
  })
}

// 新增题库分类
export function addSubjectWarehouseClass(data) {
  return request({
    url: '/hezhi/subjectWarehouseClass',
    method: 'post',
    data: data
  })
}

// 修改题库分类
export function updateSubjectWarehouseClass(data) {
  return request({
    url: '/hezhi/subjectWarehouseClass',
    method: 'put',
    data: data
  })
}

// 删除题库分类
export function delSubjectWarehouseClass(subjectWarehouseClassId) {
  return request({
    url: '/hezhi/subjectWarehouseClass/' + subjectWarehouseClassId,
    method: 'delete'
  })
}

// 查询题库分类列表
export function getSubjectWarehouseClassList(query) {
  return request({
    url: '/hezhi/subjectWarehouseClass/getSubjectWarehouseClassList',
    method: 'get',
    params: query
  })
}

// 修改模拟考试设置
export function updateSimulateExam(data) {
  return request({
    url: '/hezhi/subjectWarehouseClass/updateSimulateExam',
    method: 'post',
    data: data
  })
}

// 修改模拟考试状态
export function setSimulationStatus(subjectWarehouseClassId, simulationStatus) {
  const data = {
    subjectWarehouseClassId,
    simulationStatus
  }
  return request({
    url: '/hezhi/subjectWarehouseClass/setSimulationStatus',
    method: 'put',
    data: data
  })
}

// 获取模拟考试列表
export function getAllSubjectWarehouseCalssList() {
  return request({
    url: '/hezhi/subjectWarehouseClass/getAllSubjectWarehouseCalssList',
    method: 'get'
  })
}
