import { IsNotEmpty, IsObject } from "class-validator"; import { RunnerTeam } from '../entities/RunnerTeam'; import { ResponseRunnerGroup } from './ResponseRunnerGroup'; import { ResponseRunnerOrganization } from './ResponseRunnerOrganization'; /** * Defines the runnerTeam response. */ export class ResponseRunnerTeam extends ResponseRunnerGroup { /** * The runnerTeam's parent group (organization). */ @IsObject() @IsNotEmpty() parentGroup: ResponseRunnerOrganization; /** * 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.toResponse(); } }