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

export class AllLeaguesWithCapacityAndScoringDTO {
  @ApiProperty({ type: [LeagueSummaryDTO] })
  @IsArray()
  @ValidateNested({ each: true })
  @Type(() => LeagueSummaryDTO)
  leagues: LeagueSummaryDTO[];

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