23 lines
569 B
TypeScript
23 lines
569 B
TypeScript
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.
|
|
*/
|
|
@Entity()
|
|
export class Runner extends Participant {
|
|
/**
|
|
* The runner's associated group.
|
|
*/
|
|
@Column()
|
|
@IsNotEmpty()
|
|
//TODO:Relation
|
|
group: RunnerGroup;
|
|
|
|
@OneToMany(() => DistanceDonation, distanceDonation => distanceDonation.runner)
|
|
distanceDonations: DistanceDonation[];
|
|
}
|