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

export class CreateClassDto {
  @IsInt()
  gradeId: number;

  @IsString()
  name: string;

  @IsString()
  code: string;

  @IsInt()
  @IsIn([1, 2])
  type: number; // 1-行政班级，2-兴趣班

  @IsInt()
  @Min(1)
  @IsOptional()
  capacity?: number;

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

