import { IsBoolean, IsInt, IsNotEmpty, IsObject, IsString } from 'class-validator';

/**
 * Lightweight response returned to scan stations after a TrackScan submission.
 * Contains only what the scan display needs — validity, lap time, and runner info.
 * Full ResponseTrackScan is still returned to JWT-authenticated admin/UI callers.
 */
export class ResponseScanIntakeRunner {
    @IsString()
    @IsNotEmpty()
    displayName: string;

    @IsInt()
    totalDistance: number;
}

export class ResponseScanIntake {
    @IsBoolean()
    accepted: boolean;

    @IsBoolean()
    valid: boolean;

    @IsInt()
    lapTime: number;

    @IsObject()
    @IsNotEmpty()
    runner: ResponseScanIntakeRunner;
}
