import { IsString } from 'class-validator'; import { RunnerOrganisation } from '../entities/RunnerOrganisation'; export class CreateRunnerOrganisation { @IsString() name: string; public async toRunnerOrganisation(): Promise { let newRunnerOrganisation: RunnerOrganisation = new RunnerOrganisation(); newRunnerOrganisation.name = this.name; return newRunnerOrganisation; } }