import axios from 'axios';
import type { SubjectItem } from './types/subject';
import type { ExamQueryItem } from './types/exam';

// 通用查询
// 通用查询-考试
export function examQuery(): Promise<ExamQueryItem[]> {
  return axios.post('/api/admin/exam/list', {});
}
// 通用查询-科目
export function subjectQuery(examId: number): Promise<SubjectItem[]> {
  return axios.post('/api/admin/subject/list', {}, { params: { examId } });
}
// 通用查询-学院
export function collegeQuery(): Promise<string[]> {
  return axios.post('/api/admin/student/college/list', {});
}
// 通用查询-班级
export function classQuery(): Promise<string[]> {
  return axios.post('/api/admin/student/className/list', {});
}
// 通用查询-考点
export function examSiteQuery(): Promise<string[]> {
  return axios.post('/api/admin/student/examSite/list', {});
}
