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

export class UpdateClassDto {
  @IsInt()
  @IsOptional()
  gradeId?: number;

  @IsString()
  @IsOptional()
  name?: string;

  @IsString()
  @IsOptional()
  code?: string;

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

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

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

