import type { IValueObject } from '@gridpilot/shared/domain'; export interface UserIdProps { value: string; } export class UserId implements IValueObject { public readonly props: UserIdProps; private constructor(value: string) { if (!value || !value.trim()) { throw new Error('UserId cannot be empty'); } this.props = { value }; } public static fromString(value: string): UserId { return new UserId(value); } get value(): string { return this.props.value; } public toString(): string { return this.props.value; } public equals(other: IValueObject): boolean { return this.props.value === other.props.value; } }