shipments table
The shipments table in the E-commerce Database Schema schema has 8 columns, keyed by id, with 2 foreign keys to orders and warehouses. 1 column in shipment_lines references it.
An order can ship in several parcels, from several warehouses.
Columns (8)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| order_id | uuid | not null, references orders.id | |
| warehouse_id | uuid | not null, references warehouses.id | |
| status | shipment_status | not null | |
| carrier | varchar(80) | ||
| tracking_number | varchar(120) | ||
| shipped_at | timestamptz | ||
| delivered_at | timestamptz |
Indexes (2)
(order_id)(status)
Relationships
shipments.order_idreferencesorders.idshipments.warehouse_idreferenceswarehouses.idshipment_lines.shipment_idreferencesshipments