import { LeagueRepository } from '../ports/LeagueRepository'; import { DriverRepository } from '../ports/DriverRepository'; import { EventPublisher } from '../ports/EventPublisher'; import { LeaveLeagueCommand } from '../ports/LeaveLeagueCommand'; export class LeaveLeagueUseCase { constructor( private readonly leagueRepository: LeagueRepository, private readonly driverRepository: DriverRepository, private readonly eventPublisher: EventPublisher, ) {} async execute(command: LeaveLeagueCommand): Promise { await this.leagueRepository.removeLeagueMember(command.leagueId, command.driverId); } }