Trackscans now have a laptime that get's calculated on creation

ref #151
This commit is contained in:
niggl committed 2021-03-01 16:58:34 +01:00
1 parent 771a205fe6
commit aa833736d3
2 files changed
+18 -7

No files matched your search

+10
View File
@@ -2,6 +2,8 @@ import {
IsInt,
IsNotEmpty,
IsNumber,
IsPositive
} from "class-validator";
import { ChildEntity, Column, ManyToOne } from "typeorm";
@@ -59,6 +61,14 @@ export class TrackScan extends Scan {
@IsInt()
timestamp: number;
/**
* The scan's lap time.
* This simply get's calculated from the last lap time;
*/
@Column()
@IsNumber()
lapTime: number;
/**
* Turns this entity into it's response class.
*/