refactor dtos to ports
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import type { LeagueVisibilityInput } from '../../dtos/LeagueVisibilityInput';
|
||||
|
||||
export interface CreateLeagueWithSeasonAndScoringInputPort {
|
||||
name: string;
|
||||
description?: string;
|
||||
@@ -8,7 +6,7 @@ export interface CreateLeagueWithSeasonAndScoringInputPort {
|
||||
* - 'ranked' (or legacy 'public'): Competitive, public, affects ratings. Requires min 10 drivers.
|
||||
* - 'unranked' (or legacy 'private'): Casual with friends, no rating impact.
|
||||
*/
|
||||
visibility: LeagueVisibilityInput;
|
||||
visibility: 'ranked' | 'unranked' | 'public' | 'private';
|
||||
ownerId: string;
|
||||
gameId: string;
|
||||
maxDrivers?: number;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
import { ProtestIncident } from "@/racing/domain/entities/ProtestIncident";
|
||||
|
||||
export interface FileProtestInputPort {
|
||||
raceId: string;
|
||||
protestingDriverId: string;
|
||||
accusedDriverId: string;
|
||||
incident: ProtestIncident;
|
||||
incident: {
|
||||
sessionType: string;
|
||||
lapNumber: number;
|
||||
cornerNumber?: number;
|
||||
description: string;
|
||||
severity: 'minor' | 'major' | 'severe';
|
||||
};
|
||||
comment?: string;
|
||||
proofVideoUrl?: string;
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
import type { SponsorableEntityType } from '../../../domain/entities/SponsorshipRequest';
|
||||
|
||||
export interface GetEntitySponsorshipPricingInputPort {
|
||||
entityType: SponsorableEntityType;
|
||||
entityType: 'league' | 'team' | 'driver';
|
||||
entityId: string;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface IsDriverRegisteredForRaceInputPort {
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -3,4 +3,6 @@
|
||||
* - 'ranked' (or legacy 'public'): Competitive, public, affects driver ratings. Min 10 drivers.
|
||||
* - 'unranked' (or legacy 'private'): Casual with friends, no rating impact.
|
||||
*/
|
||||
export type LeagueVisibilityInputPort = 'ranked' | 'unranked' | 'public' | 'private';
|
||||
export interface LeagueVisibilityInputPort {
|
||||
visibility: 'ranked' | 'unranked' | 'public' | 'private';
|
||||
}
|
||||
@@ -1,8 +1,3 @@
|
||||
export interface IsDriverRegisteredForRaceInputPort {
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
}
|
||||
|
||||
export interface GetRaceRegistrationsInputPort {
|
||||
raceId: string;
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { Money } from '../../domain/value-objects/Money';
|
||||
|
||||
export interface RefundPaymentInputPort {
|
||||
originalTransactionId: string;
|
||||
amount: Money;
|
||||
amount: {
|
||||
value: number;
|
||||
currency: string;
|
||||
};
|
||||
reason: string;
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
import type { Team } from '../../../domain/entities/Team';
|
||||
|
||||
export interface UpdateTeamInputPort {
|
||||
teamId: string;
|
||||
updates: Partial<Pick<Team, 'name' | 'tag' | 'description' | 'leagues'>>;
|
||||
updates: {
|
||||
name?: string;
|
||||
tag?: string;
|
||||
description?: string;
|
||||
leagues?: string[];
|
||||
};
|
||||
updatedBy: string;
|
||||
}
|
||||
Reference in New Issue
Block a user