26
src/models/responses/ResponseRunnerTeam.ts
Normal file
26
src/models/responses/ResponseRunnerTeam.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user