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

export class RaceResultDTO {
  @ApiProperty()
  @IsString()
  driverId!: string;

  @ApiProperty()
  @IsString()
  driverName!: string;

  @ApiProperty({ nullable: true })
  @IsString()
  avatarUrl!: string | null;

  @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;
}