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
WarehouseCourierLocationCourier partner facility mappingPickup location code (externalLocationId), forward & reverse capabilities
WarehouseChannelLocationSales channel facility mappingMarketplace location ID (externalLocationId), stock sync & order pull flags
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
Payout / PayoutLineEvery partner transfer (marketplace, courier COD, gateway) and its insert-only lines
Receivable / ReceivableMatchWhat a payer owes per order or event, and the lines that paid it
DisputeCases against partners
BankStatementLine / BankAllocationBank credits and the payouts they pay
JournalVoucher / JournalLinePosted books, reversed rather than edited
Wallet / WalletLedgerEntryToken ledger
PaymentIntent / PaymentEventProvider payments

Platform​

EntityPurpose
OutboxEventTransactional side effects
ProcessedEventPer-consumer outbox idempotency, one row per event and consumer
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.