export interface EntityProps { readonly id: Id; } export abstract class Entity implements EntityProps { protected constructor(readonly id: Id) {} equals(other?: Entity): boolean { return !!other && this.id === other.id; } } // Alias for backward compatibility export type EntityAlias = EntityProps;