import { ApiPropertyOptional } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsInt, IsOptional, Min } from 'class-validator';

/**
 * Query params for the bulk registration failures endpoint. The per-item failure
 * list can be large (up to the eligible count), so it is paginated; each page is
 * enriched with registrant + session details.
 */
export class BulkFailuresQueryDto {
  @ApiPropertyOptional({ description: 'Failures page (1-based). Default 1.', minimum: 1, default: 1 })
  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  page = 1;

  @ApiPropertyOptional({ description: 'Failures per page. Default 20.', minimum: 1, default: 20 })
  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  limit = 20;
}
