Data Model

Database Schema

A normalized PostgreSQL schema powering Parts Manager — catalog, inventory, suppliers, orders, quality and documents, unified under a strict tenant boundary.

PostgreSQL 29 entities 8 logical domainsBIGINT identity keys · Full referential integrity · Row-level tenant isolation

Entity relationship diagram

Domain breakdown

Identity & Tenancy

Multi-tenant isolation with role-based access control across every Parts Manager surface.

TenantsUsersRolesUser_Roles

Catalog & BOM

Rich parts catalog with variants, attributes, category taxonomy and full bill-of-materials support.

PartsPart_VariantsPart_CategoriesPart_AttributesBOM_Lines

Suppliers & Pricing

Supplier relationships, per-supplier part offerings and tiered price break agreements.

SuppliersSupplier_PartsPrice_Breaks

Warehousing & Stock

Multi-warehouse, multi-location stock tracking with a full movement history.

WarehousesLocationsStock_LevelsStock_Movements

Sales & Fulfilment

Customer orders, order lines and outbound shipments across every fulfilment channel.

CustomersSales_OrdersSales_Order_LinesShipmentsShipment_Lines

Procurement & Receiving

Purchase orders to suppliers with inbound receipts and reconciliation.

Purchase_OrdersPurchase_Order_LinesGoods_ReceiptsReceipt_Lines

Quality & Documents

Inspection workflows and a document repository attachable to parts, suppliers and tenants.

Inspection_ReportsInspection_FindingsDocuments

Audit

Immutable audit trail for every state change across the platform.

Audit_Log