Files
SerpentRace/SerpentRace_Backend/src/Domain/IRepository/ITurnHistoryRepository.ts
T
2025-11-24 23:28:57 +01:00

34 lines
914 B
TypeScript

import { TurnHistoryAggregate, TurnActionType, TurnActionData } from '../Game/TurnHistoryAggregate';
export interface ITurnHistoryRepository {
/**
* Save a turn history entry
*/
save(turnHistory: TurnHistoryAggregate): Promise<TurnHistoryAggregate>;
/**
* Get all turn history for a game
*/
findByGameId(gameId: string): Promise<TurnHistoryAggregate[]>;
/**
* Get turn history for a specific player in a game
*/
findByGameAndPlayer(gameId: string, playerId: string): Promise<TurnHistoryAggregate[]>;
/**
* Get the last N turns for a game
*/
findLastNTurns(gameId: string, limit: number): Promise<TurnHistoryAggregate[]>;
/**
* Get turn count for a game
*/
countTurnsByGame(gameId: string): Promise<number>;
/**
* Delete all turn history for a game
*/
deleteByGameId(gameId: string): Promise<void>;
}