import { IsInt, IsString, IsBoolean, IsOptional, IsIn } from 'class-validator';

// 教师角色类型
export type TeacherRole = 'MAIN' | 'ASSIST' | 'CARE';

// 添加班级教师 DTO
export class AddClassTeacherDto {
  @IsInt()
  teacherId: number;

  @IsString()
  @IsIn(['MAIN', 'ASSIST', 'CARE'])
  role: TeacherRole;

  @IsBoolean()
  @IsOptional()
  isPrimary?: boolean;
}

// 更新班级教师 DTO
export class UpdateClassTeacherDto {
  @IsString()
  @IsIn(['MAIN', 'ASSIST', 'CARE'])
  @IsOptional()
  role?: TeacherRole;

  @IsBoolean()
  @IsOptional()
  isPrimary?: boolean;
}

// 学生调班 DTO
export class TransferStudentDto {
  @IsInt()
  toClassId: number;

  @IsString()
  @IsOptional()
  reason?: string;
}
