Code + comment cleanup for the response models

ref #39
This commit is contained in:
2020-12-20 19:38:22 +01:00
parent a85d52437b
commit 75332983c2
13 changed files with 83 additions and 91 deletions

View File

@@ -1,24 +1,24 @@
import {
IsNotEmpty,
IsObject
} from "class-validator";
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.
* Defines the runnerTeam response.
*/
export class ResponseRunnerTeam extends ResponseRunnerGroup {
/**
* The team's parent group (organisation).
* Optional.
* The runnerTeam's parent group (organisation).
*/
@IsObject()
@IsNotEmpty()
parentGroup: RunnerOrganisation;
/**
* Creates a ResponseRunnerTeam object from a runnerTeam.
* @param team The team the response shall be build for.
*/
public constructor(team: RunnerTeam) {
super(team);
this.parentGroup = team.parentGroup;