import type { IValueObject } from '@gridpilot/shared/domain'; export interface AnalyticsEntityIdProps { value: string; } /** * Value Object: AnalyticsEntityId * * Represents the ID of an entity (league, driver, team, race, sponsor) * within the analytics bounded context. */ export class AnalyticsEntityId implements IValueObject { public readonly props: AnalyticsEntityIdProps; private constructor(value: string) { this.props = { value }; } static create(raw: string): AnalyticsEntityId { const value = raw.trim(); if (!value) { throw new Error('AnalyticsEntityId must be a non-empty string'); } return new AnalyticsEntityId(value); } get value(): string { return this.props.value; } equals(other: IValueObject): boolean { return this.props.value === other.props.value; } }