import { IsOptional, IsString, IsEnum, IsInt, Min, Max } from 'class-validator';
import { Type } from 'class-transformer';
import { RegistrationState } from './review-registration.dto';

export class QueryRegistrationDto {
  @IsInt()
  @Min(1)
  @Type(() => Number)
  @IsOptional()
  page?: number = 1;

  @IsInt()
  @Min(1)
  @Max(100)
  @Type(() => Number)
  @IsOptional()
  pageSize?: number = 10;

  @IsInt()
  @Type(() => Number)
  @IsOptional()
  contestId?: number;

  @IsEnum(RegistrationState)
  @IsOptional()
  registrationState?: RegistrationState;

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

  @IsInt()
  @Type(() => Number)
  @IsOptional()
  userId?: number;
}

