refactor api modules

This commit is contained in:
2025-12-22 19:17:33 +01:00
parent c90b2166c1
commit 1333f5e907
100 changed files with 2226 additions and 1936 deletions

View File

@@ -2,22 +2,22 @@ import { ApiProperty } from '@nestjs/swagger';
class TeamDTO {
@ApiProperty()
id: string;
id!: string;
@ApiProperty()
name: string;
name!: string;
@ApiProperty()
tag: string;
tag!: string;
@ApiProperty()
description: string;
description!: string;
@ApiProperty()
ownerId: string;
ownerId!: string;
@ApiProperty({ type: [String] })
leagues: string[];
leagues!: string[];
@ApiProperty({ required: false })
createdAt?: string;
@@ -34,22 +34,22 @@ class TeamDTO {
class MembershipDTO {
@ApiProperty()
role: 'owner' | 'manager' | 'member';
role!: 'owner' | 'manager' | 'member';
@ApiProperty()
joinedAt: string;
joinedAt!: string;
@ApiProperty()
isActive: boolean;
isActive!: boolean;
}
export class GetTeamDetailsOutputDTO {
@ApiProperty({ type: TeamDTO })
team: TeamDTO;
team!: TeamDTO;
@ApiProperty({ type: MembershipDTO, nullable: true })
membership: MembershipDTO | null;
membership!: MembershipDTO | null;
@ApiProperty()
canManage: boolean;
canManage!: boolean;
}