Database ER Diagram
This page summarizes the relational model defined in packages/database/prisma/schema.prisma. The diagram highlights primary keys, foreign keys, unique identifiers, and key status or lifecycle fields; the Prisma schema remains the source of truth for full column mappings and indexes.
Diagram
Focused Views
The full diagram is useful for topology checks, but the following smaller diagrams are easier to read when reviewing one backend area at a time.
Core Organization Model
Entitlement Model
Bulk Import Model
Activity Log Context
Reading Notes
OrganizationMembershipis the join point between users and organizations. Role assignments, product allocations, access profiles, and import-row matches all attach to a membership.OrgProductEntitlementconnects an organization to a product and usage dimension, then acts as the parent for allocations, access profiles, bulk imports, and entitlement activity.ActivityEventstores optional links to the actor, target user, organization, product, entitlement, and bulk import job so different backend services can share one audit-event table.BulkImportJobandBulkImportJobRowmodel the entitlement bulk-import workflow without mutating user, organization, or entitlement records directly from the importer row.