refactor(scan): Implement KV-backed scan station submissions and response model
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user