@@ -1,4 +1,4 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from "typeorm";
|
||||
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, OneToMany } from "typeorm";
|
||||
import {
|
||||
IsBoolean,
|
||||
IsInt,
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
IsString,
|
||||
} from "class-validator";
|
||||
import { Runner } from "./Runner";
|
||||
import { TrackScan } from "./TrackScan";
|
||||
|
||||
/**
|
||||
* Defines a card that can be scanned via a scanner station.
|
||||
@@ -46,4 +47,10 @@ export class RunnerCard {
|
||||
@Column()
|
||||
@IsBoolean()
|
||||
enabled = true;
|
||||
|
||||
/**
|
||||
* Used to link cards to a track scans.
|
||||
*/
|
||||
@OneToMany(() => TrackScan, scan => scan.track)
|
||||
scans: TrackScan[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user