Files
gridpilot.gg/apps/api/src/domain/league/dtos/AllLeaguesWithCapacityDTO.ts

47 lines
810 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
export interface LeagueSettings {
maxDrivers: number;
sessionDuration?: number;
visibility?: string;
}
export interface SocialLinks {
discordUrl?: string;
youtubeUrl?: string;
websiteUrl?: string;
}
export class LeagueWithCapacityDTO {
@ApiProperty()
id!: string;
@ApiProperty()
name!: string;
@ApiProperty()
description!: string;
@ApiProperty()
ownerId!: string;
@ApiProperty()
settings!: LeagueSettings;
@ApiProperty()
createdAt!: string;
@ApiProperty({ nullable: true })
socialLinks?: SocialLinks;
@ApiProperty()
usedSlots!: number;
}
export class AllLeaguesWithCapacityDTO {
@ApiProperty({ type: [LeagueWithCapacityDTO] })
leagues!: LeagueWithCapacityDTO[];
@ApiProperty()
totalCount!: number;
}