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

ref #151
This commit is contained in:
2021-03-01 16:58:34 +01:00
parent 771a205fe6
commit aa833736d3
2 changed files with 18 additions and 7 deletions

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.
*/