Overview
The entity inheritance hierarchy diagram shows the four-level entity tree: EntityBase provides the Snowflake ID primary key; TenantEntityBase adds multi-tenant isolation; BizEntityBase composes soft delete, auditing, and optimistic concurrency; WorkflowEntityBase extends business entities with serial IDs and flow state tracking.
Key takeaways
- EntityBase provides only a Snowflake ID string — minimal footprint for all entities
- ITenantEntity ensures every tenant-scoped entity carries
TenantIdfor data isolation - IAuditableEntity adds create/modify timestamps and operator tracking including impersonation
- IConcurrencyTracked uses a
Versionlong field for optimistic locking
Related
- Order Workflow — WorkflowEntityBase in action
- Building Block: Persistence — repository and mapping patterns