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

export class ManualCheckinDto {
  @ApiProperty({ description: 'Registration ID to manually check in' })
  @IsInt()
  @IsNotEmpty()
  @Type(() => Number)
  registrationId: number;

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

  @ApiPropertyOptional({ description: 'Notes for the manual check-in' })
  @IsOptional()
  @IsString()
  notes?: string;

  checkedInByUserId?: number;

  // Populated from the authenticated caller's roles in the controller.
  roles?: string[];
}
