refactor
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { FaceValidationPort, FaceValidationResult } from '@core/media/application/ports/FaceValidationPort';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryFaceValidationAdapter implements FaceValidationPort {
|
||||
constructor(private readonly logger: Logger) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { IImageServicePort } from '@core/racing/application/ports/IImageServicePort';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryImageServiceAdapter implements IImageServicePort {
|
||||
constructor(private readonly logger: Logger) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { INotificationPreferenceRepository } from '@core/notifications/domain/repositories/INotificationPreferenceRepository';
|
||||
import { NotificationPreference } from '@core/notifications/domain/entities/NotificationPreference';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryNotificationPreferenceRepository implements INotificationPreferenceRepository {
|
||||
private preferences: Map<string, NotificationPreference> = new Map();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import { Notification } from '../../domain/entities/Notification';
|
||||
import type { INotificationRepository } from '../../domain/repositories/INotificationRepository';
|
||||
import type { NotificationType } from '../../domain/types/NotificationTypes';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryNotificationRepository implements INotificationRepository {
|
||||
private notifications: Map<string, Notification> = new Map();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { Car, CarClass, CarLicense } from '@core/racing/domain/entities/Car';
|
||||
import type { ICarRepository } from '@core/racing/domain/repositories/ICarRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryCarRepository implements ICarRepository {
|
||||
private cars: Map<string, Car>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IDriverRepository } from '@core/racing/domain/repositories/IDriverRepository';
|
||||
import { Driver } from '@core/racing/domain/entities/Driver';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryDriverRepository implements IDriverRepository {
|
||||
private drivers: Map<string, Driver> = new Map();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IGameRepository } from '@core/racing/domain/repositories/IGameRepository';
|
||||
import { Game } from '@core/racing/domain/entities/Game';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryGameRepository implements IGameRepository {
|
||||
private games: Map<string, Game> = new Map();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ILeagueMembershipRepository } from '@core/racing/domain/repositories/ILeagueMembershipRepository';
|
||||
import { LeagueMembership, JoinRequest } from '@core/racing/domain/entities/LeagueMembership';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryLeagueMembershipRepository implements ILeagueMembershipRepository {
|
||||
private memberships: Map<string, LeagueMembership> = new Map(); // Key: `${leagueId}:${driverId}`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ILeagueRepository } from '@core/racing/domain/repositories/ILeagueRepository';
|
||||
import { League } from '@core/racing/domain/entities/League';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryLeagueRepository implements ILeagueRepository {
|
||||
private leagues: Map<string, League> = new Map();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ILeagueScoringConfigRepository } from '@core/racing/domain/repositories/ILeagueScoringConfigRepository';
|
||||
import { LeagueScoringConfig } from '@core/racing/domain/entities/LeagueScoringConfig';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryLeagueScoringConfigRepository implements ILeagueScoringConfigRepository {
|
||||
private configs: Map<string, LeagueScoringConfig> = new Map(); // Key: seasonId
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ILeagueStandingsRepository, RawStanding } from '@core/league/application/ports/ILeagueStandingsRepository';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryLeagueStandingsRepository implements ILeagueStandingsRepository {
|
||||
private standings: Map<string, RawStanding[]> = new Map(); // Key: leagueId
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import type { LeagueWallet } from '../../domain/entities/LeagueWallet';
|
||||
import type { ILeagueWalletRepository } from '../../domain/repositories/ILeagueWalletRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryLeagueWalletRepository implements ILeagueWalletRepository {
|
||||
private wallets: Map<string, LeagueWallet> = new Map();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import type { DriverLivery } from '../../domain/entities/DriverLivery';
|
||||
import type { LiveryTemplate } from '../../domain/entities/LiveryTemplate';
|
||||
import type { ILiveryRepository } from '../../domain/repositories/ILiveryRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryLiveryRepository implements ILiveryRepository {
|
||||
private driverLiveries: Map<string, DriverLivery> = new Map();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import type { Penalty } from '../../domain/entities/Penalty';
|
||||
import type { IPenaltyRepository } from '../../domain/repositories/IPenaltyRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryPenaltyRepository implements IPenaltyRepository {
|
||||
private penalties: Map<string, Penalty> = new Map();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IProtestRepository } from '@core/racing/domain/repositories/IProtestRepository';
|
||||
import { Protest, ProtestStatus } from '@core/racing/domain/entities/Protest';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryProtestRepository implements IProtestRepository {
|
||||
private protests: Map<string, Protest> = new Map();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import type { IRaceEventRepository } from '../../domain/repositories/IRaceEventRepository';
|
||||
import type { RaceEvent } from '../../domain/entities/RaceEvent';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryRaceEventRepository implements IRaceEventRepository {
|
||||
private raceEvents: Map<string, RaceEvent> = new Map();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IRaceRegistrationRepository } from '@core/racing/domain/repositories/IRaceRegistrationRepository';
|
||||
import { RaceRegistration } from '@core/racing/domain/entities/RaceRegistration';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryRaceRegistrationRepository implements IRaceRegistrationRepository {
|
||||
private registrations: Map<string, RaceRegistration> = new Map(); // Key: `${raceId}:${driverId}`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IRaceRepository } from '@core/racing/domain/repositories/IRaceRepository';
|
||||
import { Race, RaceStatus } from '@core/racing/domain/entities/Race';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryRaceRepository implements IRaceRepository {
|
||||
private races: Map<string, Race> = new Map();
|
||||
|
||||
@@ -9,7 +9,7 @@ import { v4 as uuidv4 } from 'uuid';
|
||||
import { Result } from '@core/racing/domain/entities/Result';
|
||||
import type { IResultRepository } from '@core/racing/domain/repositories/IResultRepository';
|
||||
import type { IRaceRepository } from '@core/racing/domain/repositories/IRaceRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryResultRepository implements IResultRepository {
|
||||
private results: Map<string, Result>;
|
||||
|
||||
@@ -13,7 +13,7 @@ import type { IChampionshipStandingRepository } from '@core/racing/domain/reposi
|
||||
import { ChampionshipStanding } from '@core/racing/domain/entities/ChampionshipStanding';
|
||||
import type { ChampionshipType } from '@core/racing/domain/types/ChampionshipType';
|
||||
import type { ParticipantRef } from '@core/racing/domain/types/ParticipantRef';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
class SilentLogger implements Logger {
|
||||
debug(..._args: unknown[]): void {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ISeasonRepository } from '@core/racing/domain/repositories/ISeasonRepository';
|
||||
import { Season } from '@core/racing/domain/entities/Season';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemorySeasonRepository implements ISeasonRepository {
|
||||
private seasons: Map<string, Season> = new Map(); // Key: seasonId
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import type { SeasonSponsorship, SponsorshipTier } from '../../domain/entities/SeasonSponsorship';
|
||||
import type { ISeasonSponsorshipRepository } from '../../domain/repositories/ISeasonSponsorshipRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemorySeasonSponsorshipRepository implements ISeasonSponsorshipRepository {
|
||||
private sponsorships: Map<string, SeasonSponsorship> = new Map();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import type { ISessionRepository } from '../../domain/repositories/ISessionRepository';
|
||||
import type { Session } from '../../domain/entities/Session';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemorySessionRepository implements ISessionRepository {
|
||||
private sessions: Map<string, Session> = new Map();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ISponsorRepository } from '@core/racing/domain/repositories/ISponsorRepository';
|
||||
import { Sponsor } from '@core/racing/domain/entities/Sponsor';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemorySponsorRepository implements ISponsorRepository {
|
||||
private sponsors: Map<string, Sponsor> = new Map();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import type { ISponsorshipPricingRepository } from '../../domain/repositories/ISponsorshipPricingRepository';
|
||||
import { SponsorshipPricing } from '../../domain/value-objects/SponsorshipPricing';
|
||||
import type { SponsorableEntityType } from '../../domain/entities/SponsorshipRequest';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
interface StorageKey {
|
||||
entityType: SponsorableEntityType;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ISponsorshipRequestRepository } from '@core/racing/domain/repositories/ISponsorshipRequestRepository';
|
||||
import { SponsorshipRequest, SponsorableEntityType, SponsorshipRequestStatus } from '@core/racing/domain/entities/SponsorshipRequest';
|
||||
import { Logger } from '@core/shared/logging/Logger';
|
||||
import { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemorySponsorshipRequestRepository implements ISponsorshipRequestRepository {
|
||||
private requests: Map<string, SponsorshipRequest> = new Map();
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { IStandingRepository } from '@core/racing/domain/repositories/IStan
|
||||
import type { IResultRepository } from '@core/racing/domain/repositories/IResultRepository';
|
||||
import type { IRaceRepository } from '@core/racing/domain/repositories/IRaceRepository';
|
||||
import type { ILeagueRepository } from '@core/racing/domain/repositories/ILeagueRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
/**
|
||||
* Points systems presets
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
TeamJoinRequest,
|
||||
} from '@core/racing/domain/types/TeamMembership';
|
||||
import type { ITeamMembershipRepository } from '@core/racing/domain/repositories/ITeamMembershipRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryTeamMembershipRepository implements ITeamMembershipRepository {
|
||||
private membershipsByTeam: Map<string, TeamMembership[]>;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import type { Team } from '@core/racing/domain/entities/Team';
|
||||
import type { ITeamRepository } from '@core/racing/domain/repositories/ITeamRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryTeamRepository implements ITeamRepository {
|
||||
private teams: Map<string, Team>;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { Track, TrackCategory } from '@core/racing/domain/entities/Track';
|
||||
import type { ITrackRepository } from '@core/racing/domain/repositories/ITrackRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryTrackRepository implements ITrackRepository {
|
||||
private tracks: Map<string, Track>;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import type { Transaction, TransactionType } from '../../domain/entities/Transaction';
|
||||
import type { ITransactionRepository } from '../../domain/repositories/ITransactionRepository';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryTransactionRepository implements ITransactionRepository {
|
||||
private transactions: Map<string, Transaction> = new Map();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { DriverRatingProvider } from '@core/racing/application/ports/DriverRatingProvider';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryDriverRatingProvider implements DriverRatingProvider {
|
||||
constructor(private readonly logger: Logger) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { IDriverStatsService, DriverStats } from '@core/racing/domain/services/IDriverStatsService';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryDriverStatsService implements IDriverStatsService {
|
||||
constructor(private readonly logger: Logger) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { IRankingService, DriverRanking } from '@core/racing/domain/services/IRankingService';
|
||||
import type { Logger } from '@core/shared/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export class InMemoryRankingService implements IRankingService {
|
||||
constructor(private readonly logger: Logger) {
|
||||
|
||||
Reference in New Issue
Block a user