All things deletion for runner* now are clean af and cascadeing
ref #13
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { IsNotEmpty } from "class-validator";
|
||||
import { ChildEntity, getConnectionManager, ManyToOne } from "typeorm";
|
||||
import { Runner } from './Runner';
|
||||
import { ChildEntity, ManyToOne } from "typeorm";
|
||||
import { RunnerGroup } from "./RunnerGroup";
|
||||
import { RunnerOrganisation } from "./RunnerOrganisation";
|
||||
|
||||
@@ -17,11 +16,4 @@ export class RunnerTeam extends RunnerGroup {
|
||||
@IsNotEmpty()
|
||||
@ManyToOne(() => RunnerOrganisation, org => org.teams, { nullable: true })
|
||||
parentGroup?: RunnerOrganisation;
|
||||
|
||||
/**
|
||||
* Returns all runners associated with this team.
|
||||
*/
|
||||
public async getRunners() {
|
||||
return await getConnectionManager().get().getRepository(Runner).find({ group: this });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user