view models

This commit is contained in:
2025-12-18 01:20:23 +01:00
parent 7c449af311
commit cc2553876a
216 changed files with 485 additions and 10179 deletions

View File

@@ -1,18 +0,0 @@
import type { LeagueStandingsDto, StandingEntryDto } from '../dtos';
import { LeagueStandingsViewModel } from '../view-models';
/**
* League Standings Presenter
* Transforms LeagueStandingsDto to LeagueStandingsViewModel
*/
export class LeagueStandingsPresenter {
present(dto: LeagueStandingsDto, currentUserId: string, previousStandings?: StandingEntryDto[]): LeagueStandingsViewModel {
return new LeagueStandingsViewModel(dto, currentUserId, previousStandings);
}
}
// Legacy functional export for backward compatibility
export const presentLeagueStandings = (dto: LeagueStandingsDto, currentUserId: string, previousStandings?: StandingEntryDto[]): LeagueStandingsViewModel => {
const presenter = new LeagueStandingsPresenter();
return presenter.present(dto, currentUserId, previousStandings);
};