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; } }