fix data flow issues
This commit is contained in:
24
apps/api/src/domain/sponsor/dtos/RaceDTO.ts
Normal file
24
apps/api/src/domain/sponsor/dtos/RaceDTO.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsEnum, IsNumber, IsDateString } from 'class-validator';
|
||||
|
||||
export class RaceDTO {
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
id: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
name: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsDateString()
|
||||
date: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsNumber()
|
||||
views: number;
|
||||
|
||||
@ApiProperty({ enum: ['upcoming', 'completed'] })
|
||||
@IsEnum(['upcoming', 'completed'])
|
||||
status: 'upcoming' | 'completed';
|
||||
}
|
||||
Reference in New Issue
Block a user