mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
add wagon allocation snapshot to train schedules
This commit is contained in:
@@ -237,6 +237,42 @@ export enum WagonReadiness {
|
||||
ExportReady = "EXPORT_READY",
|
||||
}
|
||||
|
||||
/**
|
||||
* Frozen record of one wagon slot's allocation at the moment a schedule leaves
|
||||
* DRAFT/SCHEDULED (dispatch / arrive / cancel). Captured once into
|
||||
* `train_schedules.wagon_allocation_snapshot` so the historical wagon plan
|
||||
* survives later re-pinning of the same physical wagons onto other trains.
|
||||
*/
|
||||
export interface WagonAllocationSnapshotSlot {
|
||||
sequenceNo: number;
|
||||
trainSetWagonId: string;
|
||||
physicalWagonId: string | null;
|
||||
physicalWagonNumber: string | null;
|
||||
wagonTypeId: string | null;
|
||||
wagonTypeCode: string | null;
|
||||
/** Wagon slot status (RESERVED/LOADED/…) at capture time. */
|
||||
slotStatus: string | null;
|
||||
boardYardId: string | null;
|
||||
alightYardId: string | null;
|
||||
allocations: WagonAllocationSnapshotAllocation[];
|
||||
}
|
||||
|
||||
export interface WagonAllocationSnapshotAllocation {
|
||||
bookingId: string;
|
||||
bookingReference: string | null;
|
||||
allocatedWeightTons: number;
|
||||
loadType: string | null;
|
||||
containerNumbers: string[];
|
||||
}
|
||||
|
||||
/** Whole-schedule frozen wagon plan written at a terminal/transit transition. */
|
||||
export interface WagonAllocationSnapshot {
|
||||
/** Schedule status the snapshot was captured at (DISPATCHED/ARRIVED/CANCELLED). */
|
||||
capturedStatus: string;
|
||||
capturedAt: string;
|
||||
slots: WagonAllocationSnapshotSlot[];
|
||||
}
|
||||
|
||||
export type ScheduleTradeDirection = "IMPORT" | "EXPORT" | "DOMESTIC";
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user