01 — Quick Reference

Group Models
Restrictions & Defects InfraRestriction · InfraDefect · InfraAssessment · InfraRemedialWork · InfraVerification
Assets & Inspection InfraAsset · InfraInspectionPlan · InfraInspection
Network Links InfraDependency · InfraObligationTask · InfraSafetyHold · InfraCaseLink
Terminal Structure InfraArea · InfraTerminal · InfraPort

Every model (15) — one line each

Model It records Key foreign keys
InfraPort The port —
InfraTerminal A terminal in the port (network entity infrastructure.terminal) InfraPort
InfraArea An area of a terminal: berth area, wharf, yard, stockpile, conveyor corridor, road (network entity) InfraTerminal
InfraAsset A fixed asset (berth, wharf structure, fender, conveyor support, pavement ...) with condition grade; may have a parent asset (network entity) InfraArea, InfraAsset (parent)
InfraInspectionPlan How and how often an asset is inspected, and when the next inspection is due InfraAsset
InfraInspection One inspection with its condition grade and findings; draft, accepted or rejected InfraInspectionPlan
InfraDefect A defect found on an asset, with severity InfraAsset, InfraInspection
InfraAssessment The engineering assessment of a defect and its recommendation; needs an approver InfraDefect
InfraRestriction An engineering restriction on an asset (load, draft, speed, access limit, closure); versioned; network entity infrastructure.restriction InfraAsset, InfraDefect, InfraAssessment
InfraRemedialWork The work that repairs a defect (the work itself is done elsewhere, external_work_ref) InfraDefect
InfraVerification An independent verification, by someone other than the performer, that allows a restriction to be released InfraRestriction, InfraRemedialWork
InfraDependency Another application's record that depends on an asset (equipment installed, handling route, berth structure, evidence) InfraAsset
InfraObligationTask Overlay. A local task for an obligation assigned by assurance (assurance.obligation_assigned) — (obligation and case by cid)
InfraCaseLink Overlay. The link to an assurance case and its closure (assurance.case_closed) — (case by cid)
InfraSafetyHold Overlay. A scoped safety hold received from safety (safety.restriction_changed) InfraAsset

Vocabularies

  • InfraRestriction.status: draft · active · released · cancelled
  • InfraRestriction.restriction_type: load_limit · draft_limit · speed_limit · access_limit · closure · other
  • InfraDefect.status: open · assessed · in_remediation · closed
  • InfraDefect.severity: low · medium · high · critical
  • InfraAssessment.status: draft · approved · rejected · superseded
  • InfraRemedialWork.status: planned · in_progress · completed · cancelled
  • InfraVerification.result: pass · fail; status: recorded · superseded
  • InfraAsset.asset_type: berth · wharf_structure · fender · bollard · pavement · conveyor_support · utility · other
  • InfraAsset.condition_grade / InfraInspection.condition_grade: good · fair · poor · critical · unknown
  • InfraAsset.status: in_service · restricted · out_of_service · decommissioned
  • InfraInspectionPlan.method: visual · instrumented · diving · structural · other; status: active · suspended · retired
  • InfraInspection.status: draft · accepted · rejected
  • InfraArea.area_type: berth_area · wharf · yard · stockpile · conveyor_corridor · road · utility · other
  • InfraDependency.dependency_type: equipment_installed · handling_route · berth_structure · evidence · other; status: active · inactive
  • InfraObligationTask.status: open · in_progress · done · cancelled
  • InfraCaseLink.status: linked · closed
  • InfraSafetyHold.hold_state: active · released

Workflow actions (Phase 2 — guards are documented, not enforced yet)

Action On Moves Guards in the pack
approve_assessment InfraAssessment draft → approved assessment complete; approver authorised
activate_restriction InfraRestriction draft → active approved assessment or emergency authority; effective time and review due recorded
complete_remedial_work InfraRemedialWork in_progress → completed work evidence recorded
release_restriction InfraRestriction active → released independent verification pass; all linked remedial work complete; no other restriction implicitly released

Dashboard tiles (pack)

Active restrictions · overdue inspections · open defects.

Events

Direction Event Handler (scaffold — Phase 2)
Published infrastructure.restriction_changed (when a restriction becomes active or released) —
Consumed safety.restriction_changed Apply or release only the named scoped hold; never clear other holds (InfraSafetyHold)
Consumed assurance.obligation_assigned Create or link a local obligation task (InfraObligationTask)
Consumed assurance.case_closed Update the correlated case link only (InfraCaseLink)

Run, seed, regenerate

python server/run.py prt_01_infra                     # http://localhost:5201
python -m codegen.cli all prt_01_infra                # regenerate models, controllers and JSON after a schema change
python -m codegen.cli seed prt_01_infra --reset       # reload the sample data
python scripts/build_diagram_viewer.py prt_01_infra   # rebuild the interactive diagram
python -m codegen.cli integration prt_01_infra --network port_terminal_operations --check

The DSL and the integration files are generated by docs/port_terminal/translate_stage1.py from the pack — change the translator, not the generated files.