wip
This commit is contained in:
13
packages/racing/application/dto/CreateTeamCommandDTO.ts
Normal file
13
packages/racing/application/dto/CreateTeamCommandDTO.ts
Normal 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;
|
||||
}
|
||||
8
packages/racing/application/dto/DriverDTO.ts
Normal file
8
packages/racing/application/dto/DriverDTO.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export type DriverDTO = {
|
||||
id: string;
|
||||
iracingId: string;
|
||||
name: string;
|
||||
country: string;
|
||||
bio?: string;
|
||||
joinedAt: string;
|
||||
};
|
||||
4
packages/racing/application/dto/JoinLeagueCommandDTO.ts
Normal file
4
packages/racing/application/dto/JoinLeagueCommandDTO.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface JoinLeagueCommandDTO {
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
}
|
||||
13
packages/racing/application/dto/LeagueDTO.ts
Normal file
13
packages/racing/application/dto/LeagueDTO.ts
Normal 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;
|
||||
};
|
||||
9
packages/racing/application/dto/RaceDTO.ts
Normal file
9
packages/racing/application/dto/RaceDTO.ts
Normal 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';
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
export interface IsDriverRegisteredForRaceQueryParamsDTO {
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
}
|
||||
|
||||
export interface GetRaceRegistrationsQueryParamsDTO {
|
||||
raceId: string;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export interface RegisterForRaceCommandDTO {
|
||||
raceId: string;
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
}
|
||||
9
packages/racing/application/dto/ResultDTO.ts
Normal file
9
packages/racing/application/dto/ResultDTO.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export type ResultDTO = {
|
||||
id: string;
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
position: number;
|
||||
fastestLap: number;
|
||||
incidents: number;
|
||||
startPosition: number;
|
||||
};
|
||||
8
packages/racing/application/dto/StandingDTO.ts
Normal file
8
packages/racing/application/dto/StandingDTO.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export type StandingDTO = {
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
points: number;
|
||||
wins: number;
|
||||
position: number;
|
||||
racesCompleted: number;
|
||||
};
|
||||
54
packages/racing/application/dto/TeamCommandAndQueryDTO.ts
Normal file
54
packages/racing/application/dto/TeamCommandAndQueryDTO.ts
Normal 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;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface WithdrawFromRaceCommandDTO {
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
}
|
||||
Reference in New Issue
Block a user