website refactor
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* Tracks clicks, downloads, sign-ups, and other engagement actions.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import type {
|
||||
EngagementAction,
|
||||
EngagementEntityType,
|
||||
@@ -15,8 +15,7 @@ import { AnalyticsEntityId } from '../value-objects/AnalyticsEntityId';
|
||||
|
||||
export type { EngagementAction, EngagementEntityType } from '../types/EngagementEvent';
|
||||
|
||||
export class EngagementEvent implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class EngagementEvent extends Entity<string> {
|
||||
readonly action: EngagementAction;
|
||||
readonly entityType: EngagementEntityType;
|
||||
readonly actorId: string | undefined;
|
||||
@@ -28,7 +27,8 @@ export class EngagementEvent implements Entity<string> {
|
||||
private readonly entityIdVo: AnalyticsEntityId;
|
||||
|
||||
private constructor(props: EngagementEventProps) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.action = props.action;
|
||||
this.entityType = props.entityType;
|
||||
this.entityIdVo = AnalyticsEntityId.create(props.entityId);
|
||||
|
||||
Reference in New Issue
Block a user