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

export class CreateTeamDto {
  @IsInt()
  contestId: number;

  @IsString()
  teamName: string;

  @IsInt()
  leaderId: number;

  @IsArray()
  @IsInt({ each: true })
  @IsOptional()
  memberIds?: number[];

  @IsArray()
  @IsInt({ each: true })
  @IsOptional()
  teacherIds?: number[];

  @IsInt()
  @Min(1)
  @IsOptional()
  maxMembers?: number;
}

