final POC
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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>;
|
||||
}
|
||||
Reference in New Issue
Block a user