refactor dtos to ports

This commit is contained in:
2025-12-19 14:08:27 +01:00
parent 2ab86ec9bd
commit 499562c456
106 changed files with 386 additions and 1009 deletions

View File

@@ -2,7 +2,7 @@ import type { League } from '../../domain/entities/League';
import type { Season } from '../../domain/entities/Season';
import type { LeagueScoringConfig } from '../../domain/entities/LeagueScoringConfig';
import type { Game } from '../../domain/entities/Game';
import type { LeagueScoringPresetDTO } from '../ports/LeagueScoringPresetProvider';
import type { LeagueScoringPresetOutputPort } from '../ports/output/LeagueScoringPresetOutputPort';
import type { Presenter } from '@core/shared/presentation';
export interface LeagueSummaryViewModel {
@@ -40,7 +40,7 @@ export interface LeagueEnrichedData {
season?: Season;
scoringConfig?: LeagueScoringConfig;
game?: Game;
preset?: LeagueScoringPresetDTO;
preset?: LeagueScoringPresetOutputPort;
}
export interface IAllLeaguesWithCapacityAndScoringPresenter

View File

@@ -5,9 +5,9 @@ export interface ApproveLeagueJoinRequestViewModel {
message: string;
}
export interface ApproveLeagueJoinRequestResultDTO {
export interface ApproveLeagueJoinRequestResultPort {
success: boolean;
message: string;
}
export interface IApproveLeagueJoinRequestPresenter extends Presenter<ApproveLeagueJoinRequestResultDTO, ApproveLeagueJoinRequestViewModel> {}
export interface IApproveLeagueJoinRequestPresenter extends Presenter<ApproveLeagueJoinRequestResultPort, ApproveLeagueJoinRequestViewModel> {}

View File

@@ -13,8 +13,8 @@ export interface CreateSponsorViewModel {
sponsor: SponsorDto;
}
export interface CreateSponsorResultDTO {
export interface CreateSponsorOutputPort {
sponsor: SponsorDto;
}
export interface ICreateSponsorPresenter extends Presenter<CreateSponsorResultDTO, CreateSponsorViewModel> {}
export interface ICreateSponsorPresenter extends Presenter<CreateSponsorOutputPort, CreateSponsorViewModel> {}

View File

@@ -1,5 +1,5 @@
import type { ChampionshipConfig } from '../../domain/types/ChampionshipConfig';
import type { LeagueScoringPresetDTO } from '../ports/LeagueScoringPresetProvider';
import type { LeagueScoringPresetOutputPort } from '../ports/output/LeagueScoringPresetOutputPort';
import type { Presenter } from '@core/shared/presentation';
export interface LeagueScoringChampionshipViewModel {
@@ -29,7 +29,7 @@ export interface LeagueScoringConfigData {
gameId: string;
gameName: string;
scoringPresetId?: string;
preset?: LeagueScoringPresetDTO;
preset?: LeagueScoringPresetOutputPort;
championships: ChampionshipConfig[];
}

View File

@@ -1,13 +1,13 @@
import type { LeagueScoringPresetDTO } from '../ports/LeagueScoringPresetProvider';
import type { LeagueScoringPresetOutputPort } from '../ports/output/LeagueScoringPresetOutputPort';
import type { Presenter } from '@core/shared/presentation';
export interface LeagueScoringPresetsViewModel {
presets: LeagueScoringPresetDTO[];
presets: LeagueScoringPresetOutputPort[];
totalCount: number;
}
export interface LeagueScoringPresetsResultDTO {
presets: LeagueScoringPresetDTO[];
presets: LeagueScoringPresetOutputPort[];
}
export interface ILeagueScoringPresetsPresenter