@@ -1,7 +1,8 @@
|
||||
import { Entity, Column } from "typeorm";
|
||||
import { Entity, Column, OneToMany } from "typeorm";
|
||||
import { IsNotEmpty,} from "class-validator";
|
||||
import { Participant } from "./Participant";
|
||||
import { RunnerGroup } from "./RunnerGroup";
|
||||
import { DistanceDonation } from "./DistanceDonation";
|
||||
|
||||
/**
|
||||
* Defines a runner.
|
||||
@@ -15,4 +16,7 @@ export class Runner extends Participant {
|
||||
@IsNotEmpty()
|
||||
//TODO:Relation
|
||||
group: RunnerGroup;
|
||||
|
||||
@OneToMany(() => DistanceDonation, distanceDonation => distanceDonation.runner)
|
||||
distanceDonations: DistanceDonation[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user