Skip to main content

Entity map

Only fields that change architecture are listed. Generate a column dictionary from the Prisma files when you need every scalar.

Tenant spine​

EntityPurposeNotes
TenantIsolation boundaryisActive gates sync
TenantSubscriptionSubscription flagisActive gates sync. Tier meaning unknown
UserPersonCan have many memberships
MembershipUser in a tenantRoles hang off this
PermissionGlobal permission catalogNot tenant-filtered

Commercial spine​

EntityPurposeNotes
SellerSeller inside a tenantOwns channels
ChannelSales connectiontype is a string. Status INACTIVE vs SUSPENDED. manageState, allocationMode, defaultFulfillmentMode
IntegrationConnectionEncrypted credentialsTenant-scoped. Not Channel.config
IntegrationRegistryConnector catalogGlobal
Product / ChannelListingCatalog and per-channel listingAllocation can override channel defaults
Customer / AddressBuyer and ship-toAddressValidation is async
Order / OrderItemOMS aggregateStatus machine in TypeScript
OrderStatusHistoryTransition logWritten with status changes

Warehouse spine​

EntityPurposeNotes
Warehouse / UserWarehouseSite and who may use itWarehouseGuard
BinLocationSlotType, status, velocity enums
Stock / StockLot / StockPositionOn hand
StockMovementLedgerUnique (tenantId, idempotencyKey, createdAt)
InventoryReservation / InventoryPickDemand and pickLifecycle not fully traced
FulfillmentOrderWarehouse work for an orderOwn state machine
ShipmentConsignmentCourier, tracking, NDR

Money​

EntityPurpose
Invoice / CreditNoteTax documents. E-invoice status exists. GSTN client not found
Settlement and import/reconciliation tablesMarketplace money
CourierRemittanceCOD, separate schema file
Wallet / WalletLedgerEntryToken ledger
PaymentIntent / PaymentEventProvider payments

Platform​

EntityPurpose
OutboxEventTransactional side effects
ProcessedEventOpt-in consumer idempotency
IdempotencyRecordApplication idempotency. Not a global HTTP middleware
AuditLogIn-process audit.log listener
FileStored object metadata
SyncJobLogChannel sync runs

Timestamps are createdAt / updatedAt where the model declares them. Channel has updatedAt @updatedAt. Soft delete is deletedAt where present.