import axios from 'axios';
import {
  StudentItem,
  StudentListPageParam,
  StudentListPageRes,
  StudentUpdateParam,
} from './types/student';

// 考生管理
// 获取考生列表 (分页)
export function getStudentList(
  params: StudentListPageParam
): Promise<StudentListPageRes> {
  return axios.post('/api/student/list', {}, { params });
}
// 新增或编辑考生
export function updateStudent(data: StudentUpdateParam): Promise<StudentItem> {
  return axios.post('/api/student/update', data);
}
