refactor api modules
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user