/**
 * Domain Types: PageView
 *
 * Pure type/config definitions used by the PageView entity.
 * Kept in domain/types so domain/entities contains only entity classes.
 */

export const EntityType = {
  LEAGUE: 'league',
  DRIVER: 'driver',
  TEAM: 'team',
  RACE: 'race',
  SPONSOR: 'sponsor',
} as const;

export type EntityType = typeof EntityType[keyof typeof EntityType];

export const VisitorType = {
  ANONYMOUS: 'anonymous',
  DRIVER: 'driver',
  SPONSOR: 'sponsor',
} as const;

export type VisitorType = typeof VisitorType[keyof typeof VisitorType];

export interface PageViewProps {
  id: string;
  entityType: EntityType;
  entityId: string;
  visitorId?: string;
  visitorType: VisitorType;
  sessionId: string;
  referrer?: string;
  userAgent?: string;
  country?: string;
  timestamp: Date;
  durationMs?: number;
}