19
src/models/entities/RunnerTeam.ts
Normal file
19
src/models/entities/RunnerTeam.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Entity, Column, ManyToOne, ChildEntity } from "typeorm";
|
||||
import { IsNotEmpty } from "class-validator";
|
||||
import { RunnerGroup } from "./RunnerGroup";
|
||||
import { RunnerOrganisation } from "./RunnerOrganisation";
|
||||
|
||||
/**
|
||||
* Defines a runner team (class or deparment for example).
|
||||
*/
|
||||
@ChildEntity()
|
||||
export class RunnerTeam extends RunnerGroup {
|
||||
|
||||
/**
|
||||
* The team's parent group.
|
||||
* Optional
|
||||
*/
|
||||
@IsNotEmpty()
|
||||
@ManyToOne(() => RunnerOrganisation, org => org.teams, { nullable: true })
|
||||
parentGroup?: RunnerOrganisation;
|
||||
}
|
||||
Reference in New Issue
Block a user