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

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

  @ApiProperty({ nullable: true })
  @IsOptional()
  @IsNumber()
  rating: number | null;

  @ApiProperty({ nullable: true })
  @IsOptional()
  @IsNumber()
  rank: number | null;
}