This commit is contained in:
2025-12-15 14:44:42 +01:00
parent 5c22f8820c
commit 95d0bf5aee
28 changed files with 185 additions and 67 deletions

View File

@@ -0,0 +1,12 @@
import { PageView } from '../../domain/entities/PageView';
import { EntityType } from '../../domain/types/PageView';
export interface IPageViewRepository {
save(pageView: PageView): Promise<void>;
findById(id: string): Promise<PageView | null>;
findByEntityId(entityType: EntityType, entityId: string): Promise<PageView[]>;
findByDateRange(startDate: Date, endDate: Date): Promise<PageView[]>;
findBySession(sessionId: string): Promise<PageView[]>;
countByEntityId(entityType: EntityType, entityId: string, since?: Date): Promise<number>;
countUniqueVisitors(entityType: EntityType, entityId: string, since?: Date): Promise<number>;
}