Added relations for Scans

ref #11
This commit is contained in:
2020-12-02 15:32:11 +01:00
parent 0d9d72c223
commit 8e2eac9dc0
2 changed files with 9 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import { Participant } from "./Participant";
import { RunnerGroup } from "./RunnerGroup";
import { DistanceDonation } from "./DistanceDonation";
import { RunnerCard } from "./RunnerCard";
import { Scan } from "./Scan";
/**
* Defines a runner.
@@ -29,4 +30,10 @@ export class Runner extends Participant {
*/
@OneToMany(() => RunnerCard, card => card.runner)
cards: RunnerCard[];
/**
* Used to link runners to a scans
*/
@OneToMany(() => Scan, scan => scan.runner)
scans: Scan[];
}