Added the runnerteam class

ref #11
This commit is contained in:
Nicolai Ort 2020-12-01 18:01:32 +01:00
parent 66f7a7928c
commit ac40527fa2
1 changed files with 19 additions and 0 deletions

19
src/models/RunnerTeam.ts Normal file
View File

@ -0,0 +1,19 @@
import { Entity, Column } from "typeorm";
import { IsNotEmpty } from "class-validator";
import { RunnerGroup } from "./RunnerGroup";
/**
* Defines a runner team (class or deparment for example).
*/
@Entity()
export class RunnerTeam extends RunnerGroup {
/**
* The team's parent group.
* Optional
*/
@Column()
@IsNotEmpty()
//TODO: Relationship
parentGroup?: RunnerGroup;
}