37
src/models/responses/ResponseRunnerOrganisation.ts
Normal file
37
src/models/responses/ResponseRunnerOrganisation.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import {
|
||||
IsArray,
|
||||
IsNotEmpty,
|
||||
IsObject
|
||||
} from "class-validator";
|
||||
import { Address } from '../entities/Address';
|
||||
import { RunnerOrganisation } from '../entities/RunnerOrganisation';
|
||||
import { RunnerTeam } from '../entities/RunnerTeam';
|
||||
import { ResponseRunnerGroup } from './ResponseRunnerGroup';
|
||||
|
||||
/**
|
||||
* Defines RunnerOrgs's response class.
|
||||
*/
|
||||
export class ResponseRunnerOrganisation extends ResponseRunnerGroup {
|
||||
|
||||
/**
|
||||
* The orgs's address.
|
||||
* Optional.
|
||||
*/
|
||||
@IsObject()
|
||||
@IsNotEmpty()
|
||||
address?: Address;
|
||||
|
||||
/**
|
||||
* The orgs associated teams.
|
||||
*/
|
||||
@IsObject()
|
||||
@IsArray()
|
||||
teams: RunnerTeam[];
|
||||
|
||||
|
||||
public constructor(org: RunnerOrganisation) {
|
||||
super(org);
|
||||
this.address = org.address;
|
||||
this.teams = org.teams;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user