import { ApiProperty } from '@nestjs/swagger';
import { IsArray, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { RaceDto } from '../../race/dto/RaceDto';

export class LeagueScheduleDTO {
  @ApiProperty({ type: [RaceDto] })
  @IsArray()
  @ValidateNested({ each: true })
  @Type(() => RaceDto)
  races: RaceDto[];
}