diff --git a/src/models/responses/ResponseTrack.ts b/src/models/responses/ResponseTrack.ts index 83da863..17c128c 100644 --- a/src/models/responses/ResponseTrack.ts +++ b/src/models/responses/ResponseTrack.ts @@ -1,4 +1,4 @@ -import { IsInt, IsString } from "class-validator"; +import { IsInt, IsOptional, IsString } from "class-validator"; import { Track } from '../entities/Track'; /** @@ -23,6 +23,14 @@ export class ResponseTrack { @IsInt() distance: number; + /** + * The minimum time a runner should take to run a lap on this track. + * Will be used for fraud detection. + */ + @IsInt() + @IsOptional() + minimumLapTime?: number; + /** * Creates a ResponseTrack object from a track. * @param track The track the response shall be build for. @@ -31,5 +39,6 @@ export class ResponseTrack { this.id = track.id; this.name = track.name; this.distance = track.distance; + this.minimumLapTime = track.minimumLapTime; } }