22 lines
428 B
TypeScript
22 lines
428 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsInt, IsNotEmpty, IsOptional, IsString, Min } from 'class-validator';
|
|
|
|
export class ProtestIncidentDTO {
|
|
@ApiProperty()
|
|
@IsInt()
|
|
@Min(0)
|
|
lap!: number;
|
|
|
|
@ApiProperty()
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
description!: string;
|
|
|
|
@ApiProperty({ required: false, description: 'Seconds from race start' })
|
|
@IsOptional()
|
|
@IsInt()
|
|
@Min(0)
|
|
timeInRace?: number;
|
|
}
|
|
|