parent
907259bf73
commit
dcb791c9a2
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue