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

export class GenerateQrDto {
  @ApiProperty({ description: 'Registration ID to generate QR for' })
  @IsInt()
  @IsNotEmpty()
  @Type(() => Number)
  registrationId: number;

  @ApiPropertyOptional({ description: 'Session ID to link attendance to a specific session' })
  @IsOptional()
  @IsInt()
  @Type(() => Number)
  sessionId?: number;

  createdBy?: number;
  updatedBy?: number;
}
