parent
aa833736d3
commit
a2c97a11a3
|
@ -1,4 +1,4 @@
|
|||
import { IsDateString, IsNotEmpty } from "class-validator";
|
||||
import { IsDateString, IsNotEmpty, IsNumber } from "class-validator";
|
||||
import { TrackScan } from '../entities/TrackScan';
|
||||
import { ResponseObjectType } from '../enums/ResponseObjectType';
|
||||
import { IResponse } from './IResponse';
|
||||
|
@ -42,6 +42,13 @@ export class ResponseTrackScan extends ResponseScan implements IResponse {
|
|||
@IsNotEmpty()
|
||||
timestamp: number;
|
||||
|
||||
/**
|
||||
* The scan's lap time.
|
||||
* This simply get's calculated from the last lap time;
|
||||
*/
|
||||
@IsNumber()
|
||||
lapTime: number;
|
||||
|
||||
/**
|
||||
* Creates a ResponseTrackScan object from a scan.
|
||||
* @param scan The trackSscan the response shall be build for.
|
||||
|
@ -53,5 +60,6 @@ export class ResponseTrackScan extends ResponseScan implements IResponse {
|
|||
if (scan.station) { scan.station.toResponse(); }
|
||||
this.timestamp = scan.timestamp;
|
||||
this.distance = scan.distance;
|
||||
this.lapTime = scan.lapTime;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue