Entity Relationship Diagram
This page contains Entity Relationship Diagrams for all 7 database schemas. Each section covers one schema with its key relationships.
Schema Overview
Public Schema -- User Domain
Public Schema -- Organization and Commerce
Public Schema -- System
Pricing Schema
Allocation Schema
Sale Schema
Inventory Schema
Finance Schema
Payment Schema
Cross-Schema Relationships Summary
| From | To | Type | Description |
|---|---|---|---|
| User -- UserRole -- Role | M:M | Users assigned multiple roles via UserRole | |
| User -- UserProfile | 1:1 | Each user has one profile | |
| User -- UserIdentifier | 1:N | Multiple identification methods | |
| Organizer -- Merchant | 1:N | Organization hierarchy | |
| Merchant -- Product | 1:N | Products belong to merchants | |
| Product -- ProductVariant | 1:N | Product variations | |
| ProductVariant -- FareSet | 1:1 | Each variant has one fare set | |
| FareSet -- Fare -- FareRule | 1:N:N | Hierarchical pricing | |
| ProductVariant -- AllocationUnit | N:1 | Seat-specific products | |
| SaleOrder -- SaleOrderItem | 1:N | Order line items | |
| SaleOrderItem -- ProductVariant | N:1 | Polymorphic reference | |
| InventoryLocation -- InventoryItem -- InventoryStock | 1:N:1 | Stock hierarchy | |
| InventoryStock -- InventoryTracking | 1:N | Audit trail | |
| PurchaseOrder -- PurchaseOrderItem | 1:N | PO line items | |
| PurchaseOrder -- Vendor | N:1 | Vendor relationship | |
| FinanceTransaction -- FinanceWallet | N:1 | Wallet transactions | |
| FinanceTransaction -- FinanceCategory | N:1 | Transaction categorization |
Related Documentation
- Database Overview -- Schema summary, common columns, shared types
- Public Schema -- 30 models in the public schema
- Pricing Schema -- 7 pricing models
- Allocation Schema -- 4 allocation models
- Sale Schema -- 2 sale order models
- Inventory Schema -- 8 inventory models
- Finance Schema -- 3 finance models
- Payment Schema -- 1 webhook config model
- Migrations -- DDL migrations and seed data framework
- IGNIS Datasources -- Base datasource and ORM integration