Minimum lap times for tracks feature/71-track_times #72

Merged
niggl merged 14 commits from feature/71-track_times into dev 2021-01-03 17:18:03 +00:00
Showing only changes of commit dcb791c9a2 - Show all commits

View File

@ -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;
}
}