website refactor
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* Pre-calculated metrics for sponsor dashboard and entity analytics.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import type {
|
||||
AnalyticsSnapshotProps,
|
||||
AnalyticsMetrics,
|
||||
@@ -15,7 +15,7 @@ import type {
|
||||
export type { SnapshotEntityType, SnapshotPeriod } from '../types/AnalyticsSnapshot';
|
||||
import { AnalyticsEntityId } from '../value-objects/AnalyticsEntityId';
|
||||
|
||||
export class AnalyticsSnapshot implements IEntity<string> {
|
||||
export class AnalyticsSnapshot implements Entity<string> {
|
||||
readonly id: string;
|
||||
readonly entityType: SnapshotEntityType;
|
||||
readonly period: SnapshotPeriod;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Tracks clicks, downloads, sign-ups, and other engagement actions.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import type {
|
||||
EngagementAction,
|
||||
EngagementEntityType,
|
||||
@@ -15,7 +15,7 @@ import type {
|
||||
export type { EngagementAction, EngagementEntityType } from '../types/EngagementEvent';
|
||||
import { AnalyticsEntityId } from '../value-objects/AnalyticsEntityId';
|
||||
|
||||
export class EngagementEvent implements IEntity<string> {
|
||||
export class EngagementEvent implements Entity<string> {
|
||||
readonly id: string;
|
||||
readonly action: EngagementAction;
|
||||
readonly entityType: EngagementEntityType;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Captures visitor interactions with leagues, drivers, teams, races.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import type { EntityType, VisitorType, PageViewProps } from '../types/PageView';
|
||||
|
||||
export type { EntityType, VisitorType } from '../types/PageView';
|
||||
@@ -13,7 +13,7 @@ import { AnalyticsEntityId } from '../value-objects/AnalyticsEntityId';
|
||||
import { AnalyticsSessionId } from '../value-objects/AnalyticsSessionId';
|
||||
import { PageViewId } from '../value-objects/PageViewId';
|
||||
|
||||
export class PageView implements IEntity<string> {
|
||||
export class PageView implements Entity<string> {
|
||||
readonly entityType: EntityType;
|
||||
readonly visitorId: string | undefined;
|
||||
readonly visitorType: VisitorType;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import type { AnalyticsSnapshot, SnapshotPeriod, SnapshotEntityType } from '../entities/AnalyticsSnapshot';
|
||||
|
||||
export interface IAnalyticsSnapshotRepository {
|
||||
export interface AnalyticsSnapshotRepository {
|
||||
save(snapshot: AnalyticsSnapshot): Promise<void>;
|
||||
findById(id: string): Promise<AnalyticsSnapshot | null>;
|
||||
findByEntity(entityType: SnapshotEntityType, entityId: string): Promise<AnalyticsSnapshot[]>;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { EngagementEvent, EngagementAction, EngagementEntityType } from '../entities/EngagementEvent';
|
||||
|
||||
export interface IEngagementRepository {
|
||||
export interface EngagementRepository {
|
||||
save(event: EngagementEvent): Promise<void>;
|
||||
findById(id: string): Promise<EngagementEvent | null>;
|
||||
findByEntityId(entityType: EngagementEntityType, entityId: string): Promise<EngagementEvent[]>;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { PageView } from '../entities/PageView';
|
||||
|
||||
export interface IPageViewRepository {
|
||||
export interface PageViewRepository {
|
||||
save(pageView: PageView): Promise<void>;
|
||||
findById(id: string): Promise<PageView | null>;
|
||||
findByEntityId(entityId: string): Promise<PageView[]>;
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
import type { ValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface AnalyticsEntityIdProps {
|
||||
value: string;
|
||||
@@ -10,7 +10,7 @@ export interface AnalyticsEntityIdProps {
|
||||
* Represents the ID of an entity (league, driver, team, race, sponsor)
|
||||
* within the analytics bounded context.
|
||||
*/
|
||||
export class AnalyticsEntityId implements IValueObject<AnalyticsEntityIdProps> {
|
||||
export class AnalyticsEntityId implements ValueObject<AnalyticsEntityIdProps> {
|
||||
public readonly props: AnalyticsEntityIdProps;
|
||||
|
||||
private constructor(value: string) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
import type { ValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface AnalyticsSessionIdProps {
|
||||
value: string;
|
||||
@@ -9,7 +9,7 @@ export interface AnalyticsSessionIdProps {
|
||||
*
|
||||
* Represents an analytics session identifier within the analytics bounded context.
|
||||
*/
|
||||
export class AnalyticsSessionId implements IValueObject<AnalyticsSessionIdProps> {
|
||||
export class AnalyticsSessionId implements ValueObject<AnalyticsSessionIdProps> {
|
||||
public readonly props: AnalyticsSessionIdProps;
|
||||
|
||||
private constructor(value: string) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
import type { ValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface PageViewIdProps {
|
||||
value: string;
|
||||
@@ -9,7 +9,7 @@ export interface PageViewIdProps {
|
||||
*
|
||||
* Represents the identifier of a PageView within the analytics bounded context.
|
||||
*/
|
||||
export class PageViewId implements IValueObject<PageViewIdProps> {
|
||||
export class PageViewId implements ValueObject<PageViewIdProps> {
|
||||
public readonly props: PageViewIdProps;
|
||||
|
||||
private constructor(value: string) {
|
||||
|
||||
Reference in New Issue
Block a user