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