wip
This commit is contained in:
45
packages/racing/domain/repositories/ITeamRepository.ts
Normal file
45
packages/racing/domain/repositories/ITeamRepository.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* 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>;
|
||||
}
|
||||
Reference in New Issue
Block a user