import {
  IsInt,
  IsNotEmpty,
  IsOptional,
  IsString,
  IsEnum,
} from 'class-validator';

export class PublicRegisterActivityDto {
  @IsInt()
  @IsNotEmpty({ message: '活动ID不能为空' })
  contestId: number;

  @IsEnum(['self', 'child'], { message: '参与者类型只能是 self 或 child' })
  @IsNotEmpty()
  participantType: 'self' | 'child';

  @IsInt()
  @IsOptional()
  childId?: number;

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