Relationships
This diagram is the operational spine, not all 135 models. Foreign keys that were read use onDelete: Restrict for business parents (channel to seller, channel to tenant) and SetNull for optional files (channel image).
Channel belongs to both Seller and Tenant. Orders point at a channel. Fulfillment orders point at orders and warehouses. Shipments point at fulfillment work and a courier. Stock is keyed by product and warehouse.
User is not owned by one tenant. The JWT tenant is the active membership.
Indirect tenant models are filtered through a parent relation in the Prisma extension. The child still must not be queried with raw SQL that drops the parent predicate.