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

export class ScanQrDto {
  @ApiProperty({ description: 'Registration ID encoded in the QR code' })
  @IsInt()
  @IsNotEmpty()
  @Type(() => Number)
  registrationId: number;

  @ApiPropertyOptional({ description: 'Whether this is a manual check-in' })
  @IsOptional()
  @IsBoolean()
  isManuallyCheckedIn?: boolean;

  checkedInByUserId?: number;
}
