export const examTypeOptions = [
  { label: '月考', value: 'MONTHLY', elTagType: 'primary' },
  { label: '期中', value: 'MIDTERM', elTagType: 'warning' },
  { label: '期末', value: 'FINAL', elTagType: 'danger' },
  { label: '模拟', value: 'MOCK', elTagType: 'success' },
  { label: '竞赛', value: 'CONTEST', elTagType: '' },
  { label: '其他', value: 'OTHER', elTagType: 'info' }
];

export const gradeLevelOptions = [
  { label: 'A', value: 'A', elTagType: 'success' },
  { label: 'B', value: 'B', elTagType: 'primary' },
  { label: 'C', value: 'C', elTagType: 'warning' },
  { label: 'D', value: 'D', elTagType: 'danger' },
  { label: 'F', value: 'F', elTagType: 'danger' }
];

export interface ExamScoreVO {
  id: number | string;
  examId: number | string;
  studentId: number | string;
  subject: string;
  score: number;
  totalScore: number;
  classRank: number;
  gradeRank: number;
  gradeLevel: string;
  teacherComment: string;
}

export interface ExamVO extends BaseEntity {
  id: number | string;
  studentId: number | string;
  studentName: string;
  examName: string;
  examDate: string;
  subject: string;
  examType: string;
  school: string;
  totalScore: number;
  recorderId: number | string;
  recorderName: string;
  remark: string;
}

export interface ExamQuery extends PageQuery {
  studentId: number | string;
  examType: string;
  subject: string;
}

export interface ExamForm {
  id?: number | string;
  studentId: number | string;
  examName: string;
  examDate?: string;
  subject?: string;
  examType?: string;
  school?: string;
  totalScore?: number;
  scores?: ScoreItemForm[];
  remark?: string;
}

export interface ScoreItemForm {
  id?: number | string;
  subject: string;
  score: number;
  totalScore?: number;
  classRank?: number;
  gradeRank?: number;
  gradeLevel?: string;
  teacherComment?: string;
}
