- Documentation
- /
- Coast 13 Stevedoring
- /
- 01 — Quick Reference
01 — Quick Reference
Menu map
| Group | Models |
|---|---|
| Handling Plans | HandlingPlan · HandlingInstruction · HandlingShift |
| Tally & Corrections | HandlingTally · HandlingTallyCorrection |
| Discrepancies & Reconciliation | HandlingDiscrepancy · HandlingReconciliation · HandlingException |
| Activity & Equipment | HandlingActivity · HandlingEquipment · HandlingProvider |
| Audit & Sources | HandlingAudit · HandlingSourceSnapshot |
Every model (13) — one line each
| Model | It records | Key foreign keys |
|---|---|---|
| HandlingProvider | A stevedore or port authority that performs handling (same canonical string as coast_08's provider) | — |
| HandlingPlan | The plan of one load or discharge at one port call; the approved plan is a frozen snapshot | HandlingProvider |
| HandlingInstruction | Expected cargo: one manifest line, container, quantity, unit and direction; revised, never edited | HandlingPlan, itself (supersedes) |
| HandlingShift | A shift of a plan (planned, open, closed) | HandlingPlan |
| HandlingEquipment | A crane, forklift, reach stacker ... with its inspection | — |
| HandlingTally | One physical count (positive) with evidence and condition; immutable once verified; no instruction = unidentified | HandlingInstruction, HandlingShift |
| HandlingTallyCorrection | The signed reversal of a verified tally and its positive replacement | HandlingTally (original and replacement) |
| HandlingActivity | Handling or crane activity with equipment and time; verified, then published as evidence for supplier invoice matching | HandlingShift, HandlingEquipment |
| HandlingDiscrepancy | A short, over, damaged or unidentified difference, with resolution and follow-up reference | HandlingPlan, HandlingInstruction, HandlingTally |
| HandlingReconciliation | The reconciliation of a plan with its expected and actual hash | HandlingPlan |
| HandlingException | A control exception (HANDLING_DISCREPANCY, plan on an older manifest, call no longer valid) | HandlingPlan, HandlingDiscrepancy |
| HandlingAudit | Who did what, append-only | HandlingPlan |
| HandlingSourceSnapshot | What other applications told us (effective cargo, voyage, call, mapping, movements, notices): versioned, hashed | — |
Vocabularies
- HandlingPlan.status: DRAFT · APPROVED · ACTIVE · RECONCILED · CLOSED (operation: LOAD · DISCHARGE · MIXED)
- HandlingInstruction.status: PLANNED · SUPERSEDED · CANCELLED (unit: PACKAGE · CONTAINER · TEU · KG · M3, never converted)
- HandlingShift.status: PLANNED · OPEN · CLOSED
- HandlingTally.status: RECORDED · VERIFIED · CORRECTED (condition GOOD · DAMAGED · UNKNOWN)
- HandlingTallyCorrection.status: PROPOSED · APPROVED · APPLIED · REJECTED
- HandlingActivity.status: RECORDED · VERIFIED · VOID (type HANDLING_IN · HANDLING_OUT · CRANE · HEAVY_LIFT)
- HandlingDiscrepancy.status: OPEN · RESOLVED (type SHORT · OVER · DAMAGED · UNIDENTIFIED; resolution ACCEPTED · RECONCILED)
- HandlingReconciliation.status: MATCHED · ACCEPTED_VARIANCE
- HandlingException.status: OPEN · RESOLVED · REJECTED
Messages (network member)
| Commands accepted | none (the pack gives SHP-13 no commands) |
| Events published | handling.tally_verified (signed: the verified quantity, or the reversal of a corrected tally, with original_tally_ref) · handling.activity_verified (for SHP-08 and SHP-06) · handling.reconciled · handling.exception_raised · handling.exception_resolved |
| Events consumed | manifest.effective_cargo · voyage.snapshot · voyage.portcall_snapshot · voyage.cargo_call_mapped · tracking.movement_accepted · portinterface.terminal_notice · assurance.action_requested |
Run, seed, regenerate
python server/run.py coast_13_stevedoring # http://localhost:5197
python -m codegen.cli all coast_13_stevedoring # regenerate models, controllers and JSON after a schema change
python -m codegen.cli seed coast_13_stevedoring --reset # reload the sample data
python -m codegen.cli integration coast_13_stevedoring # regenerate the integration package (handlers.py is never overwritten)
python scripts/build_diagram_viewer.py coast_13_stevedoring # rebuild the interactive diagram