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

@@ -1,4 +1,4 @@
import { PrimaryGeneratedColumn, Column } from "typeorm";
import { PrimaryGeneratedColumn, Column, ManyToOne } from "typeorm";
import {
IsInt,
IsNotEmpty,
@@ -24,7 +24,7 @@ export abstract class Scan {
*/
@Column()
@IsNotEmpty()
//TODO: Relationship
@ManyToOne(() => Runner, runner => runner.scans)
runner: Runner;
/**