refactor
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
|
||||
export interface SponsorDto {
|
||||
id: string;
|
||||
name: string;
|
||||
contactEmail: string;
|
||||
websiteUrl: string | undefined;
|
||||
logoUrl: string | undefined;
|
||||
createdAt: Date;
|
||||
}
|
||||
|
||||
export interface CreateSponsorViewModel {
|
||||
sponsor: SponsorDto;
|
||||
}
|
||||
|
||||
export interface CreateSponsorResultDTO {
|
||||
sponsor: SponsorDto;
|
||||
}
|
||||
|
||||
export interface ICreateSponsorPresenter extends Presenter<CreateSponsorResultDTO, CreateSponsorViewModel> {}
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
import type { GetEntitySponsorshipPricingResultDTO } from '../use-cases/GetEntitySponsorshipPricingUseCase';
|
||||
|
||||
export interface IEntitySponsorshipPricingPresenter {
|
||||
present(data: GetEntitySponsorshipPricingResultDTO | null): void;
|
||||
}
|
||||
export interface IEntitySponsorshipPricingPresenter extends Presenter<GetEntitySponsorshipPricingResultDTO | null, GetEntitySponsorshipPricingResultDTO | null> {}
|
||||
20
core/racing/application/presenters/IGetAllRacesPresenter.ts
Normal file
20
core/racing/application/presenters/IGetAllRacesPresenter.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
|
||||
export interface RaceViewModel {
|
||||
id: string;
|
||||
name: string;
|
||||
date: string;
|
||||
leagueName?: string;
|
||||
}
|
||||
|
||||
export interface AllRacesPageViewModel {
|
||||
races: RaceViewModel[];
|
||||
totalCount: number;
|
||||
}
|
||||
|
||||
export interface GetAllRacesResultDTO {
|
||||
races: RaceViewModel[];
|
||||
totalCount: number;
|
||||
}
|
||||
|
||||
export interface IGetAllRacesPresenter extends Presenter<GetAllRacesResultDTO, AllRacesPageViewModel> {}
|
||||
20
core/racing/application/presenters/IGetSponsorsPresenter.ts
Normal file
20
core/racing/application/presenters/IGetSponsorsPresenter.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
|
||||
export interface SponsorDto {
|
||||
id: string;
|
||||
name: string;
|
||||
contactEmail: string;
|
||||
websiteUrl: string | undefined;
|
||||
logoUrl: string | undefined;
|
||||
createdAt: Date;
|
||||
}
|
||||
|
||||
export interface GetSponsorsViewModel {
|
||||
sponsors: SponsorDto[];
|
||||
}
|
||||
|
||||
export interface GetSponsorsResultDTO {
|
||||
sponsors: SponsorDto[];
|
||||
}
|
||||
|
||||
export interface IGetSponsorsPresenter extends Presenter<GetSponsorsResultDTO, GetSponsorsViewModel> {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
|
||||
export interface SponsorshipPricingItemDto {
|
||||
id: string;
|
||||
level: string;
|
||||
price: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface GetSponsorshipPricingResultDTO {
|
||||
pricing: SponsorshipPricingItemDto[];
|
||||
}
|
||||
|
||||
export interface GetSponsorshipPricingViewModel {
|
||||
pricing: SponsorshipPricingItemDto[];
|
||||
}
|
||||
|
||||
export interface IGetSponsorshipPricingPresenter extends Presenter<GetSponsorshipPricingResultDTO, GetSponsorshipPricingViewModel> {}
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
|
||||
export interface GetTotalRacesViewModel {
|
||||
totalRaces: number;
|
||||
}
|
||||
|
||||
export interface GetTotalRacesResultDTO {
|
||||
totalRaces: number;
|
||||
}
|
||||
|
||||
export interface IGetTotalRacesPresenter extends Presenter<GetTotalRacesResultDTO, GetTotalRacesViewModel> {}
|
||||
@@ -0,0 +1,19 @@
|
||||
import type { Presenter } from '@gridpilot/shared/presentation/Presenter';
|
||||
|
||||
export interface ImportRaceResultsSummaryViewModel {
|
||||
success: boolean;
|
||||
raceId: string;
|
||||
driversProcessed: number;
|
||||
resultsRecorded: number;
|
||||
errors?: string[];
|
||||
}
|
||||
|
||||
export interface ImportRaceResultsApiResultDTO {
|
||||
success: boolean;
|
||||
raceId: string;
|
||||
driversProcessed: number;
|
||||
resultsRecorded: number;
|
||||
errors?: string[];
|
||||
}
|
||||
|
||||
export interface IImportRaceResultsApiPresenter extends Presenter<ImportRaceResultsApiResultDTO, ImportRaceResultsSummaryViewModel> {}
|
||||
Reference in New Issue
Block a user