import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsBoolean } from 'class-validator';

export class RaceDetailUserResultDTO {
  @ApiProperty()
  @IsNumber()
  position!: number;

  @ApiProperty()
  @IsNumber()
  startPosition!: number;

  @ApiProperty()
  @IsNumber()
  incidents!: number;

  @ApiProperty()
  @IsNumber()
  fastestLap!: number;

  @ApiProperty()
  @IsNumber()
  positionChange!: number;

  @ApiProperty()
  @IsBoolean()
  isPodium!: boolean;

  @ApiProperty()
  @IsBoolean()
  isClean!: boolean;

  @ApiProperty({ nullable: true })
  ratingChange!: number | null;
}