website refactor
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* Pre-calculated metrics for sponsor dashboard and entity analytics.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import type {
|
||||
AnalyticsMetrics,
|
||||
AnalyticsSnapshotProps,
|
||||
@@ -15,8 +15,7 @@ import type {
|
||||
import { AnalyticsEntityId } from '../value-objects/AnalyticsEntityId';
|
||||
export type { SnapshotEntityType, SnapshotPeriod } from '../types/AnalyticsSnapshot';
|
||||
|
||||
export class AnalyticsSnapshot implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class AnalyticsSnapshot extends Entity<string> {
|
||||
readonly entityType: SnapshotEntityType;
|
||||
readonly period: SnapshotPeriod;
|
||||
readonly startDate: Date;
|
||||
@@ -27,7 +26,7 @@ export class AnalyticsSnapshot implements Entity<string> {
|
||||
private readonly entityIdVo: AnalyticsEntityId;
|
||||
|
||||
private constructor(props: AnalyticsSnapshotProps) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
this.entityType = props.entityType;
|
||||
this.entityIdVo = AnalyticsEntityId.create(props.entityId);
|
||||
this.period = props.period;
|
||||
|
||||
Reference in New Issue
Block a user