Files
edr-platform/apps/edr-freight-api/src/seed/warehouse-layout.json
Hagernesh a6ea1a48ac feat(warehouses): track physical container stack and slot positions
Extends the warehouse hierarchy below zone with ground stacks and vertical
slots, so a container's exact position is recorded rather than only its zone.

- freight.warehouse_zone_stacks / warehouse_zone_slots, plus nullable
  stack_id / slot_id on warehouse_inventory (existing rows stay valid)
- slot occupancy is derived from inventory status, guarded by a partial
  unique index, so no exit path has to remember to free a slot
- placement service: hierarchy validation, bottom-up stacking rules,
  accessibility/blocking-container reads, capacity vs slot summaries
- stack CRUD with auto-generated slots; reuses warehouse-zone permissions
- slot support folded into the existing move()/store() paths
- fix: validateLocation now rejects a mismatched warehouse/yard/zone triple
- seed:warehouse-layout builds the layout from a JSON config
2026-08-28 16:09:41 +00:00

29 lines
1.0 KiB
JSON

{
"facility": {
"code": "GELAN",
"name": "Gelan Dry Port",
"facilityType": "DRY_PORT"
},
"levels": ["L1", "L2", "L3", "L4"],
"kinds": [
{ "suffix": "OPEN", "letter": "O", "name": "Open Warehouse", "type": "OPEN_WAREHOUSE" },
{ "suffix": "CLOSED", "letter": "C", "name": "Closed Warehouse", "type": "CLOSED_WAREHOUSE" }
],
"yards": [
{ "label": "A", "type": "CONTAINER_YARD", "capacityContainers": 150 },
{ "label": "B", "type": "CONTAINER_YARD", "capacityContainers": 150 },
{ "label": "C", "type": "GENERAL_CARGO_YARD", "capacityContainers": null },
{ "label": "D", "type": "BULK_YARD", "capacityContainers": null },
{ "label": "E", "type": "HAZARDOUS_YARD", "capacityContainers": null },
{ "label": "F", "type": "COLD_STORAGE_YARD", "capacityContainers": null }
],
"zones": [
{ "label": "A", "capacityContainers": 60 },
{ "label": "B", "capacityContainers": 45 },
{ "label": "C", "capacityContainers": 45 }
],
"stack": {
"maxStackHeight": 3
}
}