diff --git a/src/models/responses/ResponseTrackScan.ts b/src/models/responses/ResponseTrackScan.ts index ffd9ceb..9bbc6f3 100644 --- a/src/models/responses/ResponseTrackScan.ts +++ b/src/models/responses/ResponseTrackScan.ts @@ -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; } }