Files
gridpilot.gg/packages/racing/domain/repositories/ITeamRepository.ts
2025-12-04 11:54:42 +01:00

45 lines
807 B
TypeScript

/**
* Application Port: ITeamRepository
*
* Repository interface for Team aggregate operations.
* This defines the persistence boundary for Team entities.
*/
import type { Team } from '../entities/Team';
export interface ITeamRepository {
/**
* Find a team by ID.
*/
findById(id: string): Promise<Team | null>;
/**
* Find all teams.
*/
findAll(): Promise<Team[]>;
/**
* Find teams by league ID.
*/
findByLeagueId(leagueId: string): Promise<Team[]>;
/**
* Create a new team.
*/
create(team: Team): Promise<Team>;
/**
* Update an existing team.
*/
update(team: Team): Promise<Team>;
/**
* Delete a team by ID.
*/
delete(id: string): Promise<void>;
/**
* Check if a team exists by ID.
*/
exists(id: string): Promise<boolean>;
}