import { Entity, Column, ManyToOne } from "typeorm"; import { IsNotEmpty } from "class-validator"; import { RunnerGroup } from "./RunnerGroup"; import { RunnerOrganisation } from "./RunnerOrganisation"; /** * Defines a runner team (class or deparment for example). */ @Entity() export class RunnerTeam extends RunnerGroup { /** * The team's parent group. * Optional */ @IsNotEmpty() @ManyToOne(() => RunnerOrganisation, org => org.teams, { nullable: true }) parentGroup?: RunnerOrganisation; }