86211923db
Repository Interface Optimization: - Created IBaseRepository.ts and IPaginatedRepository.ts - Refactored all 7 repository interfaces to extend base interfaces - Eliminated ~200 lines of redundant code (70% reduction) - Improved type safety and maintainability Dependency Injection Improvements: - Added EmailService and GameTokenService to DIContainer - Updated CreateUserCommandHandler constructor for DI - Updated RequestPasswordResetCommandHandler constructor for DI - Enhanced testability and service consistency Environment Configuration: - Created comprehensive .env.example with 40+ variables - Organized into 12 logical sections (Database, Security, Email, etc.) - Added security guidelines and best practices - Documented all backend environment requirements Documentation: - Added comprehensive codebase review - Created refactoring summary report - Added frontend implementation guide Impact: Improved code quality, reduced maintenance overhead, enhanced developer experience
46 lines
886 B
TypeScript
46 lines
886 B
TypeScript
import * as DeckAggregate from "../../Domain/Deck/DeckAggregate";
|
|
|
|
export interface GameStartDto {
|
|
gameid: string;
|
|
maxplayers: number;
|
|
logintype: number;
|
|
gamecode: string;
|
|
deck: gamedeck[];
|
|
}
|
|
|
|
enum decktype {
|
|
JOCKER = 0,
|
|
LUCK = 1,
|
|
QUEST = 2
|
|
}
|
|
|
|
export interface cards {
|
|
cardid: string;
|
|
question?: string;
|
|
answer?: string;
|
|
consequence?: DeckAggregate.Consequence | null;
|
|
played?: boolean;
|
|
playerid?: string;
|
|
}
|
|
|
|
export interface gamedeck {
|
|
deckid: string;
|
|
decktype: decktype;
|
|
cards: cards[];
|
|
}
|
|
|
|
export interface GameDataDto {
|
|
id: string;
|
|
gamecode: string;
|
|
maxplayers: number;
|
|
logintype: number;
|
|
gamedecks: gamedeck[];
|
|
players: string[];
|
|
started: boolean;
|
|
finished: boolean;
|
|
winner?: string;
|
|
currentplayer?: string;
|
|
createdate: Date;
|
|
startdate?: Date;
|
|
enddate?: Date;
|
|
} |