website refactor
This commit is contained in:
@@ -9,7 +9,6 @@ import { Entity } from '@core/shared/domain/Entity';
|
||||
import type { EntityType, PageViewProps, VisitorType } from '../types/PageView';
|
||||
import { AnalyticsEntityId } from '../value-objects/AnalyticsEntityId';
|
||||
import { AnalyticsSessionId } from '../value-objects/AnalyticsSessionId';
|
||||
import { PageViewId } from '../value-objects/PageViewId';
|
||||
|
||||
export type { EntityType, VisitorType } from '../types/PageView';
|
||||
|
||||
@@ -23,13 +22,11 @@ export class PageView extends Entity<string> {
|
||||
readonly timestamp: Date;
|
||||
readonly durationMs: number | undefined;
|
||||
|
||||
private readonly idVo: PageViewId;
|
||||
private readonly entityIdVo: AnalyticsEntityId;
|
||||
private readonly sessionIdVo: AnalyticsSessionId;
|
||||
|
||||
private constructor(props: PageViewProps) {
|
||||
super(props.id);
|
||||
this.idVo = PageViewId.create(props.id);
|
||||
this.entityType = props.entityType;
|
||||
this.entityIdVo = AnalyticsEntityId.create(props.entityId);
|
||||
this.visitorId = props.visitorId;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Defines persistence operations for AnalyticsSnapshot entities.
|
||||
*/
|
||||
|
||||
import type { AnalyticsSnapshot, SnapshotPeriod, SnapshotEntityType } from '../entities/AnalyticsSnapshot';
|
||||
import type { AnalyticsSnapshot, SnapshotEntityType, SnapshotPeriod } from '../entities/AnalyticsSnapshot';
|
||||
|
||||
export interface AnalyticsSnapshotRepository {
|
||||
save(snapshot: AnalyticsSnapshot): Promise<void>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { EngagementEvent, EngagementAction, EngagementEntityType } from '../entities/EngagementEvent';
|
||||
import type { EngagementAction, EngagementEntityType, EngagementEvent } from '../entities/EngagementEvent';
|
||||
|
||||
export interface EngagementRepository {
|
||||
save(event: EngagementEvent): Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user