Runnerteams now with resolving relations and response types :O

ref #13
This commit is contained in:
2020-12-04 21:38:28 +01:00
parent c53e94d205
commit a437ada3b3
3 changed files with 105 additions and 12 deletions

View File

@@ -0,0 +1,26 @@
import {
IsNotEmpty,
IsObject
} from "class-validator";
import { RunnerOrganisation } from '../entities/RunnerOrganisation';
import { RunnerTeam } from '../entities/RunnerTeam';
import { ResponseRunnerGroup } from './ResponseRunnerGroup';
/**
* Defines RunnerTeam's response class.
*/
export class ResponseRunnerTeam extends ResponseRunnerGroup {
/**
* The team's parent group (organisation).
* Optional.
*/
@IsObject()
@IsNotEmpty()
parentGroup: RunnerOrganisation;
public constructor(team: RunnerTeam) {
super(team);
this.parentGroup = team.parentGroup;
}
}