This commit is contained in:
2025-12-17 14:04:11 +01:00
parent 1ea9c9649f
commit daa4bb6576
238 changed files with 4263 additions and 1752 deletions

View File

@@ -0,0 +1,16 @@
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;
}

View File

@@ -0,0 +1,16 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsArray, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { LeagueWithCapacityDTO } from './LeagueWithCapacityDTO';
export class AllLeaguesWithCapacityDTO {
@ApiProperty({ type: [LeagueWithCapacityDTO] })
@IsArray()
@ValidateNested({ each: true })
@Type(() => LeagueWithCapacityDTO)
leagues: LeagueWithCapacityDTO[];
@ApiProperty()
@IsNumber()
totalCount: number;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
export class ApproveJoinRequestInputDTO {
@ApiProperty()
@IsString()
requestId: string;
@ApiProperty()
@IsString()
leagueId: string;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsBoolean } from 'class-validator';
export class ApproveJoinRequestOutputDTO {
@ApiProperty()
@IsBoolean()
success: boolean;
@ApiProperty({ required: false })
@IsString()
message?: string;
}

View File

@@ -0,0 +1,20 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsEnum } from 'class-validator';
export class CreateLeagueInputDTO {
@ApiProperty()
@IsString()
name: string;
@ApiProperty()
@IsString()
description: string;
@ApiProperty({ enum: ['public', 'private'] })
@IsEnum(['public', 'private'])
visibility: 'public' | 'private';
@ApiProperty()
@IsString()
ownerId: string;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsBoolean } from 'class-validator';
export class CreateLeagueOutputDTO {
@ApiProperty()
@IsString()
leagueId: string;
@ApiProperty()
@IsBoolean()
success: boolean;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsOptional, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { LeagueConfigFormModelDTO } from './LeagueConfigFormModelDTO';
export class GetLeagueAdminConfigOutputDTO {
@ApiProperty({ type: () => LeagueConfigFormModelDTO, nullable: true })
@IsOptional()
@ValidateNested()
@Type(() => LeagueConfigFormModelDTO)
form: LeagueConfigFormModelDTO | null;
}

View File

@@ -0,0 +1,8 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
export class GetLeagueAdminConfigQueryDTO {
@ApiProperty()
@IsString()
leagueId: string;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
export class GetLeagueAdminPermissionsInputDTO {
@ApiProperty()
@IsString()
leagueId: string;
@ApiProperty()
@IsString()
performerDriverId: string;
}

View File

@@ -0,0 +1,8 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
export class GetLeagueJoinRequestsQueryDTO {
@ApiProperty()
@IsString()
leagueId: string;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
export class GetLeagueOwnerSummaryQueryDTO {
@ApiProperty()
@IsString()
ownerId: string;
@ApiProperty()
@IsString()
leagueId: string;
}

View File

@@ -0,0 +1,8 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
export class GetLeagueProtestsQueryDTO {
@ApiProperty()
@IsString()
leagueId: string;
}

View File

@@ -0,0 +1,8 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
export class GetLeagueSeasonsQueryDTO {
@ApiProperty()
@IsString()
leagueId: string;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsOptional, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { LeagueConfigFormModelDTO } from './LeagueConfigFormModelDTO';
export class LeagueAdminConfigDTO {
@ApiProperty({ type: () => LeagueConfigFormModelDTO, nullable: true })
@IsOptional()
@ValidateNested()
@Type(() => LeagueConfigFormModelDTO)
form: LeagueConfigFormModelDTO | null;
}

View File

@@ -0,0 +1,38 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsOptional, IsArray, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { LeagueJoinRequestDTO } from './LeagueJoinRequestDTO';
import { LeagueOwnerSummaryDTO } from './LeagueOwnerSummaryDTO';
import { LeagueAdminConfigDTO } from './LeagueAdminConfigDTO';
import { LeagueAdminProtestsDTO } from './LeagueAdminProtestsDTO';
import { LeagueSeasonSummaryDTO } from './LeagueSeasonSummaryDTO';
export class LeagueAdminDTO {
@ApiProperty({ type: [LeagueJoinRequestDTO] })
@IsArray()
@ValidateNested({ each: true })
@Type(() => LeagueJoinRequestDTO)
joinRequests: LeagueJoinRequestDTO[];
@ApiProperty({ type: () => LeagueOwnerSummaryDTO, nullable: true })
@IsOptional()
@ValidateNested()
@Type(() => LeagueOwnerSummaryDTO)
ownerSummary: LeagueOwnerSummaryDTO | null;
@ApiProperty({ type: () => LeagueAdminConfigDTO })
@ValidateNested()
@Type(() => LeagueAdminConfigDTO)
config: LeagueAdminConfigDTO;
@ApiProperty({ type: () => LeagueAdminProtestsDTO })
@ValidateNested()
@Type(() => LeagueAdminProtestsDTO)
protests: LeagueAdminProtestsDTO;
@ApiProperty({ type: [LeagueSeasonSummaryDTO] })
@IsArray()
@ValidateNested({ each: true })
@Type(() => LeagueSeasonSummaryDTO)
seasons: LeagueSeasonSummaryDTO[];
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsBoolean } from 'class-validator';
export class LeagueAdminPermissionsDTO {
@ApiProperty()
@IsBoolean()
canRemoveMember: boolean;
@ApiProperty()
@IsBoolean()
canUpdateRoles: boolean;
}

View File

@@ -0,0 +1,24 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsArray, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { DriverDto } from '../../driver/dto/DriverDto';
import { RaceDto } from '../../race/dto/RaceDto';
import { ProtestDTO } from './ProtestDTO';
export class LeagueAdminProtestsDTO {
@ApiProperty({ type: [ProtestDTO] })
@IsArray()
@ValidateNested({ each: true })
@Type(() => ProtestDTO)
protests: ProtestDTO[];
@ApiProperty({ type: () => RaceDto })
@ValidateNested()
@Type(() => RaceDto)
racesById: { [raceId: string]: RaceDto };
@ApiProperty({ type: () => DriverDto })
@ValidateNested()
@Type(() => DriverDto)
driversById: { [driverId: string]: DriverDto };
}

View File

@@ -0,0 +1,16 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsEnum } from 'class-validator';
export class LeagueConfigFormModelBasicsDTO {
@ApiProperty()
@IsString()
name: string;
@ApiProperty()
@IsString()
description: string;
@ApiProperty({ enum: ['public', 'private'] })
@IsEnum(['public', 'private'])
visibility: 'public' | 'private';
}

View File

@@ -0,0 +1,49 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsArray, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { LeagueConfigFormModelBasicsDTO } from './LeagueConfigFormModelBasicsDTO';
import { LeagueConfigFormModelStructureDTO } from './LeagueConfigFormModelStructureDTO';
import { LeagueConfigFormModelScoringDTO } from './LeagueConfigFormModelScoringDTO';
import { LeagueConfigFormModelDropPolicyDTO } from './LeagueConfigFormModelDropPolicyDTO';
import { LeagueConfigFormModelStewardingDTO } from './LeagueConfigFormModelStewardingDTO';
import { LeagueConfigFormModelTimingsDTO } from './LeagueConfigFormModelTimingsDTO';
export class LeagueConfigFormModelDTO {
@ApiProperty()
@IsString()
leagueId: string;
@ApiProperty({ type: LeagueConfigFormModelBasicsDTO })
@ValidateNested()
@Type(() => LeagueConfigFormModelBasicsDTO)
basics: LeagueConfigFormModelBasicsDTO;
@ApiProperty({ type: LeagueConfigFormModelStructureDTO })
@ValidateNested()
@Type(() => LeagueConfigFormModelStructureDTO)
structure: LeagueConfigFormModelStructureDTO;
@ApiProperty({ type: [Object] })
@IsArray()
championships: any[];
@ApiProperty({ type: LeagueConfigFormModelScoringDTO })
@ValidateNested()
@Type(() => LeagueConfigFormModelScoringDTO)
scoring: LeagueConfigFormModelScoringDTO;
@ApiProperty({ type: LeagueConfigFormModelDropPolicyDTO })
@ValidateNested()
@Type(() => LeagueConfigFormModelDropPolicyDTO)
dropPolicy: LeagueConfigFormModelDropPolicyDTO;
@ApiProperty({ type: LeagueConfigFormModelTimingsDTO })
@ValidateNested()
@Type(() => LeagueConfigFormModelTimingsDTO)
timings: LeagueConfigFormModelTimingsDTO;
@ApiProperty({ type: LeagueConfigFormModelStewardingDTO })
@ValidateNested()
@Type(() => LeagueConfigFormModelStewardingDTO)
stewarding: LeagueConfigFormModelStewardingDTO;
}

View File

@@ -0,0 +1,13 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsOptional, IsEnum } from 'class-validator';
export class LeagueConfigFormModelDropPolicyDTO {
@ApiProperty({ enum: ['none', 'worst_n'] })
@IsEnum(['none', 'worst_n'])
strategy: 'none' | 'worst_n';
@ApiProperty({ required: false })
@IsOptional()
@IsNumber()
n?: number;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNumber } from 'class-validator';
export class LeagueConfigFormModelScoringDTO {
@ApiProperty()
@IsString()
type: string;
@ApiProperty()
@IsNumber()
points: number;
}

View File

@@ -0,0 +1,41 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsBoolean, IsOptional, IsEnum } from 'class-validator';
export class LeagueConfigFormModelStewardingDTO {
@ApiProperty({ enum: ['single_steward', 'committee_vote'] })
@IsEnum(['single_steward', 'committee_vote'])
decisionMode: 'single_steward' | 'committee_vote';
@ApiProperty({ required: false })
@IsOptional()
@IsNumber()
requiredVotes?: number;
@ApiProperty()
@IsBoolean()
requireDefense: boolean;
@ApiProperty()
@IsNumber()
defenseTimeLimit: number;
@ApiProperty()
@IsNumber()
voteTimeLimit: number;
@ApiProperty()
@IsNumber()
protestDeadlineHours: number;
@ApiProperty()
@IsNumber()
stewardingClosesHours: number;
@ApiProperty()
@IsBoolean()
notifyAccusedOnProtest: boolean;
@ApiProperty()
@IsBoolean()
notifyOnVoteRequired: boolean;
}

View File

@@ -0,0 +1,9 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsEnum } from 'class-validator';
export class LeagueConfigFormModelStructureDTO {
@ApiProperty()
@IsString()
@IsEnum(['solo', 'team'])
mode: 'solo' | 'team';
}

View File

@@ -0,0 +1,16 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNumber } from 'class-validator';
export class LeagueConfigFormModelTimingsDTO {
@ApiProperty()
@IsString()
raceDayOfWeek: string;
@ApiProperty()
@IsNumber()
raceTimeHour: number;
@ApiProperty()
@IsNumber()
raceTimeMinute: number;
}

View File

@@ -0,0 +1,34 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsDate, IsOptional, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { DriverDto } from '../../driver/dto/DriverDto';
export class LeagueJoinRequestDTO {
@ApiProperty()
@IsString()
id: string;
@ApiProperty()
@IsString()
leagueId: string;
@ApiProperty()
@IsString()
driverId: string;
@ApiProperty()
@IsDate()
@Type(() => Date)
requestedAt: Date;
@ApiProperty({ required: false })
@IsOptional()
@IsString()
message?: string;
@ApiProperty({ type: () => DriverDto, required: false })
@IsOptional()
@ValidateNested()
@Type(() => DriverDto)
driver?: DriverDto;
}

View File

@@ -0,0 +1,24 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsDate, IsEnum, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { DriverDto } from '../../driver/dto/DriverDto';
export class LeagueMemberDTO {
@ApiProperty()
@IsString()
driverId: string;
@ApiProperty({ type: () => DriverDto })
@ValidateNested()
@Type(() => DriverDto)
driver: DriverDto;
@ApiProperty({ enum: ['owner', 'manager', 'member'] })
@IsEnum(['owner', 'manager', 'member'])
role: 'owner' | 'manager' | 'member';
@ApiProperty()
@IsDate()
@Type(() => Date)
joinedAt: Date;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsArray, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { LeagueMemberDTO } from './LeagueMemberDTO';
export class LeagueMembershipsDTO {
@ApiProperty({ type: [LeagueMemberDTO] })
@IsArray()
@ValidateNested({ each: true })
@Type(() => LeagueMemberDTO)
members: LeagueMemberDTO[];
}

View File

@@ -0,0 +1,21 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsOptional, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { DriverDto } from '../../driver/dto/DriverDto';
export class LeagueOwnerSummaryDTO {
@ApiProperty({ type: () => DriverDto })
@ValidateNested()
@Type(() => DriverDto)
driver: DriverDto;
@ApiProperty({ nullable: true })
@IsOptional()
@IsNumber()
rating: number | null;
@ApiProperty({ nullable: true })
@IsOptional()
@IsNumber()
rank: number | null;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsArray, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { RaceDto } from '../../race/dto/RaceDto';
export class LeagueScheduleDTO {
@ApiProperty({ type: [RaceDto] })
@IsArray()
@ValidateNested({ each: true })
@Type(() => RaceDto)
races: RaceDto[];
}

View File

@@ -0,0 +1,37 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsBoolean, IsDate, IsOptional } from 'class-validator';
import { Type } from 'class-transformer';
export class LeagueSeasonSummaryDTO {
@ApiProperty()
@IsString()
seasonId: string;
@ApiProperty()
@IsString()
name: string;
@ApiProperty()
@IsString()
status: string;
@ApiProperty({ required: false })
@IsOptional()
@IsDate()
@Type(() => Date)
startDate?: Date;
@ApiProperty({ required: false })
@IsOptional()
@IsDate()
@Type(() => Date)
endDate?: Date;
@ApiProperty()
@IsBoolean()
isPrimary: boolean;
@ApiProperty()
@IsBoolean()
isParallelActive: boolean;
}

View File

@@ -0,0 +1,10 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsOptional } from 'class-validator';
export class LeagueSettingsDTO {
@ApiProperty({ nullable: true })
@IsOptional()
@IsNumber()
maxDrivers?: number;
// Add other league settings properties as needed
}

View File

@@ -0,0 +1,23 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNumber, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { DriverDto } from '../../driver/dto/DriverDto';
export class LeagueStandingDTO {
@ApiProperty()
@IsString()
driverId: string;
@ApiProperty({ type: () => DriverDto })
@ValidateNested()
@Type(() => DriverDto)
driver: DriverDto;
@ApiProperty()
@IsNumber()
points: number;
@ApiProperty()
@IsNumber()
rank: number;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsArray, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { LeagueStandingDTO } from './LeagueStandingDTO';
export class LeagueStandingsDTO {
@ApiProperty({ type: [LeagueStandingDTO] })
@IsArray()
@ValidateNested({ each: true })
@Type(() => LeagueStandingDTO)
standings: LeagueStandingDTO[];
}

View File

@@ -0,0 +1,16 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNumber } from 'class-validator';
export class LeagueStatsDTO {
@ApiProperty()
@IsNumber()
totalMembers: number;
@ApiProperty()
@IsNumber()
totalRaces: number;
@ApiProperty()
@IsNumber()
averageRating: number;
}

View File

@@ -0,0 +1,58 @@
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;
}

View File

@@ -0,0 +1,45 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNumber, IsOptional, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { LeagueSettingsDTO } from './LeagueSettingsDTO';
export class LeagueWithCapacityDTO {
@ApiProperty()
@IsString()
id: string;
@ApiProperty()
@IsString()
name: string;
// ... other properties of LeagueWithCapacityDTO
@ApiProperty({ nullable: true })
@IsOptional()
@IsString()
description?: string;
@ApiProperty()
@IsString()
ownerId: string;
@ApiProperty({ type: () => LeagueSettingsDTO })
@ValidateNested()
@Type(() => LeagueSettingsDTO)
settings: LeagueSettingsDTO;
@ApiProperty()
@IsString()
createdAt: string;
@ApiProperty()
@IsNumber()
usedSlots: number;
@ApiProperty({ type: () => Object, nullable: true }) // Using Object for generic social links
@IsOptional()
socialLinks?: {
discordUrl?: string;
youtubeUrl?: string;
websiteUrl?: string;
};
}

View File

@@ -0,0 +1,36 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsDate, IsEnum } from 'class-validator';
import { Type } from 'class-transformer';
// TODO: protests are filed at race level but also managed on league level
export class ProtestDTO {
@ApiProperty()
@IsString()
id: string;
@ApiProperty()
@IsString()
raceId: string;
@ApiProperty()
@IsString()
protestingDriverId: string;
@ApiProperty()
@IsString()
accusedDriverId: string;
@ApiProperty()
@IsDate()
@Type(() => Date)
submittedAt: Date;
@ApiProperty()
@IsString()
description: string;
@ApiProperty({ enum: ['pending', 'accepted', 'rejected'] })
@IsEnum(['pending', 'accepted', 'rejected'])
status: 'pending' | 'accepted' | 'rejected';
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
export class RejectJoinRequestInputDTO {
@ApiProperty()
@IsString()
requestId: string;
@ApiProperty()
@IsString()
leagueId: string;
}

View File

@@ -0,0 +1,12 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsBoolean } from 'class-validator';
export class RejectJoinRequestOutputDTO {
@ApiProperty()
@IsBoolean()
success: boolean;
@ApiProperty({ required: false })
@IsString()
message?: string;
}

View File

@@ -0,0 +1,16 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
export class RemoveLeagueMemberInputDTO {
@ApiProperty()
@IsString()
leagueId: string;
@ApiProperty()
@IsString()
performerDriverId: string;
@ApiProperty()
@IsString()
targetDriverId: string;
}

View File

@@ -0,0 +1,8 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsBoolean } from 'class-validator';
export class RemoveLeagueMemberOutputDTO {
@ApiProperty()
@IsBoolean()
success: boolean;
}

View File

@@ -0,0 +1,42 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsBoolean, IsDate, IsOptional, IsEnum } from 'class-validator';
import { Type } from 'class-transformer';
export class SeasonDTO {
@ApiProperty()
@IsString()
seasonId: string;
@ApiProperty()
@IsString()
name: string;
@ApiProperty()
@IsString()
leagueId: string;
@ApiProperty({ required: false })
@IsOptional()
@IsDate()
@Type(() => Date)
startDate?: Date;
@ApiProperty({ required: false })
@IsOptional()
@IsDate()
@Type(() => Date)
endDate?: Date;
@ApiProperty({ enum: ['planned', 'active', 'completed'] })
@IsEnum(['planned', 'active', 'completed'])
status: 'planned' | 'active' | 'completed';
@ApiProperty()
@IsBoolean()
isPrimary: boolean;
@ApiProperty({ required: false })
@IsOptional()
@IsString()
seasonGroupId?: string;
}

View File

@@ -0,0 +1,20 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsEnum } from 'class-validator';
export class UpdateLeagueMemberRoleInputDTO {
@ApiProperty()
@IsString()
leagueId: string;
@ApiProperty()
@IsString()
performerDriverId: string;
@ApiProperty()
@IsString()
targetDriverId: string;
@ApiProperty({ enum: ['owner', 'manager', 'member'] })
@IsEnum(['owner', 'manager', 'member'])
newRole: 'owner' | 'manager' | 'member';
}

View File

@@ -0,0 +1,8 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsBoolean } from 'class-validator';
export class UpdateLeagueMemberRoleOutputDTO {
@ApiProperty()
@IsBoolean()
success: boolean;
}