Alpha Release 0.0.7 #73

Merged
niggl merged 74 commits from dev into main 2021-01-03 17:22:28 +00:00
Showing only changes of commit 02f7ddbb37 - Show all commits

View File

@ -1,4 +1,4 @@
import { IsInt, IsNotEmpty, IsPositive, IsString } from 'class-validator';
import { IsInt, IsNotEmpty, IsOptional, IsPositive, IsString } from 'class-validator';
import { Track } from '../entities/Track';
/**
@ -19,6 +19,15 @@ export class CreateTrack {
@IsPositive()
distance: number;
/**
* The minimum time a runner should take to run a lap on this track.
* Will be used for fraud detection.
*/
@IsInt()
@IsOptional()
@IsPositive()
minimumLapTime?: number;
/**
* Creates a new Track entity from this.
*/
@ -27,6 +36,7 @@ export class CreateTrack {
newTrack.name = this.name;
newTrack.distance = this.distance;
newTrack.minimumLapTime = this.minimumLapTime;
return newTrack;
}