Skip to main content

Class diagrams

UML class diagrams of internal/domain/**, then the ports and adapters around them. Only types and methods that exist in the code are drawn; plain getters are left out. The fields of InterWarehouseTransfer are unexported in the code and shown as private attributes.

Package transfer: the saga aggregate​

Source: internal/domain/transfer/saga.go, workflow.go, events.go, analytics.go

DemandReleased is built by the use cases (pickDemand, dispatchDemand) from a loaded transfer, not raised by the aggregate.

Package transfer: planner, stuck detection, runs​

Source: internal/domain/transfer/model.go, planner.go, stuck.go, analytics.go

ValidateApproval (approval.go) and ParseStuckThresholds are package functions, not types.

Package planning​

Source: internal/domain/planning/capability.go, demand.go, capacity_plan.go, facts.go, snapshot.go

Ports and adapters​

Source: internal/application/ports/*.go, internal/application/usecases/*.go, internal/adapters/outbound/postgres/*.go, cmd/network-inventory-planning/main.go

TransferRepo serves both the saga repository and the stuck-transfer reader (wireHealthTicker passes postgres.NewTransferRepo(pool) as the reader).