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

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

  @ApiProperty()
  @IsString()
  name: string;

  @ApiProperty({ nullable: true })
  @IsOptional()
  @IsString()
  description?: string;

  @ApiProperty({ nullable: true })
  @IsOptional()
  @IsString()
  logoUrl?: string;

  @ApiProperty({ nullable: true })
  @IsOptional()
  @IsString()
  coverImage?: string;

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

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

  @ApiProperty()
  @IsBoolean()
  isPublic: boolean;

  @ApiProperty()
  @IsString()
  ownerId: string;

  @ApiProperty({ nullable: true })
  @IsOptional()
  @IsString()
  ownerName?: string;

  @ApiProperty({ nullable: true })
  @IsOptional()
  @IsString()
  scoringType?: string;

  @ApiProperty({ nullable: true })
  @IsOptional()
  @IsString()
  status?: string;
}