refactor
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
export interface AcceptSponsorshipRequestDTO {
|
||||
requestId: string;
|
||||
respondedBy: string; // driverId of the person accepting
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export interface AcceptSponsorshipRequestResultDTO {
|
||||
requestId: string;
|
||||
sponsorshipId: string;
|
||||
status: 'accepted';
|
||||
acceptedAt: Date;
|
||||
platformFee: number;
|
||||
netAmount: number;
|
||||
}
|
||||
13
core/racing/application/dto/ApplyForSponsorshipDTO.ts
Normal file
13
core/racing/application/dto/ApplyForSponsorshipDTO.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { SponsorableEntityType } from '../../domain/entities/SponsorshipRequest';
|
||||
import type { SponsorshipTier } from '../../domain/entities/SeasonSponsorship';
|
||||
import type { Currency } from '../../domain/value-objects/Money';
|
||||
|
||||
export interface ApplyForSponsorshipDTO {
|
||||
sponsorId: string;
|
||||
entityType: SponsorableEntityType;
|
||||
entityId: string;
|
||||
tier: SponsorshipTier;
|
||||
offeredAmount: number; // in cents
|
||||
currency?: Currency;
|
||||
message?: string;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export interface ApplyForSponsorshipResultDTO {
|
||||
requestId: string;
|
||||
status: 'pending';
|
||||
createdAt: Date;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface ApproveLeagueJoinRequestResultDTO {
|
||||
success: boolean;
|
||||
message: string;
|
||||
}
|
||||
3
core/racing/application/dto/CancelRaceCommandDTO.ts
Normal file
3
core/racing/application/dto/CancelRaceCommandDTO.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export interface CancelRaceCommandDTO {
|
||||
raceId: string;
|
||||
}
|
||||
3
core/racing/application/dto/CompleteRaceCommandDTO.ts
Normal file
3
core/racing/application/dto/CompleteRaceCommandDTO.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export interface CompleteRaceCommandDTO {
|
||||
raceId: string;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export interface CreateLeagueWithSeasonAndScoringResultDTO {
|
||||
leagueId: string;
|
||||
seasonId: string;
|
||||
scoringPresetId?: string;
|
||||
scoringPresetName?: string;
|
||||
}
|
||||
10
core/racing/application/dto/CreateSponsorResultDTO.ts
Normal file
10
core/racing/application/dto/CreateSponsorResultDTO.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export interface CreateSponsorResultDTO {
|
||||
sponsor: {
|
||||
id: string;
|
||||
name: string;
|
||||
contactEmail: string;
|
||||
websiteUrl?: string;
|
||||
logoUrl?: string;
|
||||
createdAt: Date;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import type { SponsorableEntityType } from '../../domain/entities/SponsorshipRequest';
|
||||
|
||||
export interface GetEntitySponsorshipPricingDTO {
|
||||
entityType: SponsorableEntityType;
|
||||
entityId: string;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { SponsorableEntityType } from '../../domain/entities/SponsorshipRequest';
|
||||
import type { SponsorshipSlotDTO } from '../use-cases/SponsorshipSlotDTO';
|
||||
|
||||
export interface GetEntitySponsorshipPricingResultDTO {
|
||||
entityType: SponsorableEntityType;
|
||||
entityId: string;
|
||||
acceptingApplications: boolean;
|
||||
customRequirements?: string;
|
||||
mainSlot?: SponsorshipSlotDTO;
|
||||
secondarySlot?: SponsorshipSlotDTO;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface GetLeagueAdminPermissionsResultDTO {
|
||||
canRemoveMember: boolean;
|
||||
canUpdateRoles: boolean;
|
||||
}
|
||||
7
core/racing/application/dto/GetLeagueAdminResultDTO.ts
Normal file
7
core/racing/application/dto/GetLeagueAdminResultDTO.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export interface GetLeagueAdminResultDTO {
|
||||
league: {
|
||||
id: string;
|
||||
ownerId: string;
|
||||
};
|
||||
// Additional data would be populated by combining multiple use cases
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export interface GetLeagueJoinRequestsResultDTO {
|
||||
joinRequests: Array<{
|
||||
id: string;
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
requestedAt: Date;
|
||||
message?: string;
|
||||
driver: {
|
||||
id: string;
|
||||
name: string;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface GetLeagueJoinRequestsUseCaseParams {
|
||||
leagueId: string;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import type { LeagueMembership } from '../../domain/entities/LeagueMembership';
|
||||
|
||||
export interface GetLeagueMembershipsResultDTO {
|
||||
memberships: LeagueMembership[];
|
||||
drivers: { id: string; name: string }[];
|
||||
}
|
||||
13
core/racing/application/dto/SponsorshipSlotDTO.ts
Normal file
13
core/racing/application/dto/SponsorshipSlotDTO.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { SponsorshipTier } from '../../domain/entities/SeasonSponsorship';
|
||||
|
||||
export interface SponsorshipSlotDTO {
|
||||
tier: SponsorshipTier;
|
||||
price: number;
|
||||
currency: string;
|
||||
formattedPrice: string;
|
||||
benefits: string[];
|
||||
available: boolean;
|
||||
maxSlots: number;
|
||||
filledSlots: number;
|
||||
pendingRequests: number;
|
||||
}
|
||||
@@ -1,8 +1,5 @@
|
||||
import type { Team } from '../../domain/entities/Team';
|
||||
import type {
|
||||
TeamJoinRequest,
|
||||
TeamMembership,
|
||||
} from '../../domain/types/TeamMembership';
|
||||
import type { TeamMembership } from '../../domain/types/TeamMembership';
|
||||
|
||||
export interface JoinTeamCommandDTO {
|
||||
teamId: string;
|
||||
@@ -15,6 +12,7 @@ export interface LeaveTeamCommandDTO {
|
||||
}
|
||||
|
||||
export interface ApproveTeamJoinRequestCommandDTO {
|
||||
teamId: string;
|
||||
requestId: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user