This commit is contained in:
2025-12-04 15:15:24 +01:00
parent b7d5551ea7
commit c698a0b893
119 changed files with 1167 additions and 2652 deletions

View File

@@ -0,0 +1,13 @@
import type { Team } from '../../domain/entities/Team';
export interface CreateTeamCommandDTO {
name: string;
tag: string;
description: string;
ownerId: string;
leagues: string[];
}
export interface CreateTeamResultDTO {
team: Team;
}

View File

@@ -0,0 +1,8 @@
export type DriverDTO = {
id: string;
iracingId: string;
name: string;
country: string;
bio?: string;
joinedAt: string;
};

View File

@@ -0,0 +1,4 @@
export interface JoinLeagueCommandDTO {
leagueId: string;
driverId: string;
}

View File

@@ -0,0 +1,13 @@
export type LeagueDTO = {
id: string;
name: string;
description: string;
ownerId: string;
settings: {
pointsSystem: 'f1-2024' | 'indycar' | 'custom';
sessionDuration?: number;
qualifyingFormat?: 'single-lap' | 'open';
customPoints?: Record<number, number>;
};
createdAt: string;
};

View File

@@ -0,0 +1,9 @@
export type RaceDTO = {
id: string;
leagueId: string;
scheduledAt: string;
track: string;
car: string;
sessionType: 'practice' | 'qualifying' | 'race';
status: 'scheduled' | 'completed' | 'cancelled';
};

View File

@@ -0,0 +1,8 @@
export interface IsDriverRegisteredForRaceQueryParamsDTO {
raceId: string;
driverId: string;
}
export interface GetRaceRegistrationsQueryParamsDTO {
raceId: string;
}

View File

@@ -0,0 +1,5 @@
export interface RegisterForRaceCommandDTO {
raceId: string;
leagueId: string;
driverId: string;
}

View File

@@ -0,0 +1,9 @@
export type ResultDTO = {
id: string;
raceId: string;
driverId: string;
position: number;
fastestLap: number;
incidents: number;
startPosition: number;
};

View File

@@ -0,0 +1,8 @@
export type StandingDTO = {
leagueId: string;
driverId: string;
points: number;
wins: number;
position: number;
racesCompleted: number;
};

View File

@@ -0,0 +1,54 @@
import type { Team, TeamJoinRequest, TeamMembership } from '../../domain/entities/Team';
export interface JoinTeamCommandDTO {
teamId: string;
driverId: string;
}
export interface LeaveTeamCommandDTO {
teamId: string;
driverId: string;
}
export interface ApproveTeamJoinRequestCommandDTO {
requestId: string;
}
export interface RejectTeamJoinRequestCommandDTO {
requestId: string;
}
export interface UpdateTeamCommandDTO {
teamId: string;
updates: Partial<Pick<Team, 'name' | 'tag' | 'description' | 'leagues'>>;
updatedBy: string;
}
export type GetAllTeamsQueryResultDTO = Team[];
export interface GetTeamDetailsQueryParamsDTO {
teamId: string;
driverId: string;
}
export interface GetTeamDetailsQueryResultDTO {
team: Team;
membership: TeamMembership | null;
}
export interface GetTeamMembersQueryParamsDTO {
teamId: string;
}
export interface GetTeamJoinRequestsQueryParamsDTO {
teamId: string;
}
export interface GetDriverTeamQueryParamsDTO {
driverId: string;
}
export interface GetDriverTeamQueryResultDTO {
team: Team;
membership: TeamMembership;
}

View File

@@ -0,0 +1,4 @@
export interface WithdrawFromRaceCommandDTO {
raceId: string;
driverId: string;
}