import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNumber, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { DriverDto } from '../../driver/dto/DriverDto';

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

  @ApiProperty({ type: () => DriverDto })
  @ValidateNested()
  @Type(() => DriverDto)
  driver: DriverDto;

  @ApiProperty()
  @IsNumber()
  points: number;

  @ApiProperty()
  @IsNumber()
  rank: number;
}