15
									
								
								src/models/CreateRunnerOrganisation.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/models/CreateRunnerOrganisation.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
import { IsString } from 'class-validator';
 | 
			
		||||
import { RunnerOrganisation } from './RunnerOrganisation';
 | 
			
		||||
 | 
			
		||||
export class CreateRunnerOrganisation {
 | 
			
		||||
    @IsString()
 | 
			
		||||
    name: string;
 | 
			
		||||
 | 
			
		||||
    public async toRunnerOrganisation(): Promise<RunnerOrganisation> {
 | 
			
		||||
        let newRunnerOrganisation: RunnerOrganisation = new RunnerOrganisation();
 | 
			
		||||
 | 
			
		||||
        newRunnerOrganisation.name = this.name;
 | 
			
		||||
 | 
			
		||||
        return newRunnerOrganisation;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user