refactor use cases

This commit is contained in:
2026-01-08 15:34:51 +01:00
parent d984ab24a8
commit 52e9a2f6a7
362 changed files with 5192 additions and 8409 deletions

View File

@@ -17,6 +17,8 @@ describe('LeagueOwnerSummaryPresenter', () => {
joinedAt: { toDate: () => new Date('2024-01-01T00:00:00Z') } as any,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any,
totalMembers: 50,
activeMembers: 45,
rating: 1500,
rank: 100,
};

View File

@@ -1,3 +1,4 @@
import { Injectable } from '@nestjs/common';
import type { UseCaseOutputPort } from '@core/shared/application';
import type { GetLeagueRosterMembersResult } from '@core/racing/application/use-cases/GetLeagueRosterMembersUseCase';
import type { GetLeagueRosterJoinRequestsResult } from '@core/racing/application/use-cases/GetLeagueRosterJoinRequestsUseCase';
@@ -5,6 +6,7 @@ import type { LeagueRosterMemberDTO } from '../dtos/LeagueRosterMemberDTO';
import type { LeagueRosterJoinRequestDTO } from '../dtos/LeagueRosterJoinRequestDTO';
import type { DriverDTO } from '../../driver/dtos/DriverDTO';
@Injectable()
export class GetLeagueRosterMembersPresenter implements UseCaseOutputPort<GetLeagueRosterMembersResult> {
private viewModel: LeagueRosterMemberDTO[] | null = null;
@@ -37,6 +39,7 @@ export class GetLeagueRosterMembersPresenter implements UseCaseOutputPort<GetLea
}
}
@Injectable()
export class GetLeagueRosterJoinRequestsPresenter implements UseCaseOutputPort<GetLeagueRosterJoinRequestsResult> {
private viewModel: LeagueRosterJoinRequestDTO[] | null = null;