Skip to content

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 ​

100%

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 ​

100%

Entitlement Model ​

100%

Bulk Import Model ​

100%

Activity Log Context ​

100%

Reading Notes ​

  • OrganizationMembership is the join point between users and organizations. Role assignments, product allocations, access profiles, and import-row matches all attach to a membership.
  • OrgProductEntitlement connects an organization to a product and usage dimension, then acts as the parent for allocations, access profiles, bulk imports, and entitlement activity.
  • ActivityEvent stores optional links to the actor, target user, organization, product, entitlement, and bulk import job so different backend services can share one audit-event table.
  • BulkImportJob and BulkImportJobRow model the entitlement bulk-import workflow without mutating user, organization, or entitlement records directly from the importer row.