export const lessonTypeOptions = [
  { label: '一对一', value: 'ONE_ON_ONE', elTagType: 'danger' },
  { label: '小班课', value: 'SMALL_CLASS', elTagType: 'primary' },
  { label: '大班课', value: 'LARGE_CLASS', elTagType: 'success' },
  { label: '体验课', value: 'EXPERIENCE', elTagType: 'warning' }
];

export const scheduleStatusOptions = [
  { label: '待上课', value: '0', elTagType: 'info' },
  { label: '已签到', value: '1', elTagType: 'warning' },
  { label: '已消课', value: '2', elTagType: 'success' },
  { label: '请假', value: '3', elTagType: 'primary' },
  { label: '已取消', value: '4', elTagType: 'info' },
  { label: '旷课', value: '5', elTagType: 'danger' }
];

// 消课比例映射(按课型): 体验0.5 正课1 一对一2
export const consumeRateMap: Record<string, number> = {
  EXPERIENCE: 0.5,
  SMALL_CLASS: 1,
  LARGE_CLASS: 1,
  ONE_ON_ONE: 2
};

export interface LessonStudentVO {
  id: number | string;
  scheduleId: number | string;
  studentId: number | string;
  contractId: number | string;
  packageId: number | string;
  hoursShould: number;
  hoursActual: number;
  consumeRate: number;
  status: string;
  checkInAt: string;
  checkOutAt: string;
  reason: string;
  remark: string;
}

export interface LessonStudentForm {
  id?: number | string;
  studentId: number | string;
  contractId: number | string;
  packageId: number | string;
  hoursShould: number;
  consumeRate: number;
  remark: string;
}

export interface ScheduleVO extends BaseEntity {
  id: number | string;
  scheduleNo: string;
  studentId: number | string;
  contractId: number | string;
  tutorId: number | string;
  subject: string;
  lessonType: string;
  className: string;
  lessonDate: string;
  startTime: string;
  endTime: string;
  durationHours: number;
  classroom: string;
  lessonContent: string;
  homework: string;
  maxStudents: number;
  enrolledCount: number;
  status: string;
  checkInAt: string;
  checkOutAt: string;
  consumeHours: number;
  consumeRate: number;
  comment: string;
  remark: string;
  students: LessonStudentVO[];
}

export interface ScheduleForm {
  id: number | string | undefined;
  scheduleNo: string;
  studentId: number | string | undefined;
  contractId: number | string | undefined;
  tutorId: number | string | undefined;
  subject: string;
  lessonType: string;
  className: string;
  lessonDate: string;
  startTime: string;
  endTime: string;
  durationHours: number;
  classroom: string;
  lessonContent: string;
  homework: string;
  maxStudents: number;
  consumeRate: number;
  comment: string;
  remark: string;
  students: LessonStudentForm[];
}

export interface ScheduleQuery extends PageQuery {
  scheduleNo: string;
  studentId: number | string;
  tutorId: number | string;
  subject: string;
  lessonType: string;
  status: string;
}

export interface CheckInForm {
  scheduleId: number | string;
  studentId: number | string;
}
