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

export class RaceDetailRaceDTO {
  @ApiProperty()
  @IsString()
  id!: string;

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

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

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

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

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

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

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

  @ApiProperty({ required: false })
  @IsOptional()
  @IsNumber()
  registeredCount?: number;

  @ApiProperty({ required: false })
  @IsOptional()
  @IsNumber()
  maxParticipants?: number;
}