All checks were successful
continuous-integration/drone/pr Build is passing
ref #68
40 lines
965 B
TypeScript
40 lines
965 B
TypeScript
import {
|
|
IsArray,
|
|
|
|
IsObject,
|
|
IsOptional
|
|
} from "class-validator";
|
|
import { Address } from '../entities/Address';
|
|
import { RunnerOrganisation } from '../entities/RunnerOrganisation';
|
|
import { RunnerTeam } from '../entities/RunnerTeam';
|
|
import { ResponseRunnerGroup } from './ResponseRunnerGroup';
|
|
|
|
/**
|
|
* Defines the runnerOrganisation response.
|
|
*/
|
|
export class ResponseRunnerOrganisation extends ResponseRunnerGroup {
|
|
|
|
/**
|
|
* The runnerOrganisation's address.
|
|
*/
|
|
@IsObject()
|
|
@IsOptional()
|
|
address?: Address;
|
|
|
|
/**
|
|
* The runnerOrganisation associated teams.
|
|
*/
|
|
@IsArray()
|
|
teams: RunnerTeam[];
|
|
|
|
/**
|
|
* Creates a ResponseRunnerOrganisation object from a runnerOrganisation.
|
|
* @param org The runnerOrganisation the response shall be build for.
|
|
*/
|
|
public constructor(org: RunnerOrganisation) {
|
|
super(org);
|
|
this.address = org.address;
|
|
this.teams = org.teams;
|
|
}
|
|
}
|