mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 07:10:57 +00:00
feat: add per-ton cargo loading limits and update related services
This commit is contained in:
@@ -60,6 +60,17 @@ export class CargoType extends BaseEntity {
|
||||
@Column({ name: 'items_per_wagon_map', type: 'jsonb', nullable: true })
|
||||
itemsPerWagonMap?: Record<string, number> | null;
|
||||
|
||||
/**
|
||||
* PER_TON (bulk) only: the most tons of THIS cargo that may ride one wagon of
|
||||
* each allowed type, keyed by wagon-type id (e.g. sugar → { NW5: 50 } on a
|
||||
* 70T wagon). Caps both the wagon count and how much each wagon is loaded, so
|
||||
* 200T of sugar takes 4 wagons at 50T rather than 3 at 70T. A missing key (or
|
||||
* a null map) means the wagon's full rated capacity — unlike itemsPerWagonMap
|
||||
* this is optional, so cargo without a loading limit is unaffected.
|
||||
*/
|
||||
@Column({ name: 'tons_per_wagon_map', type: 'jsonb', nullable: true })
|
||||
tonsPerWagonMap?: Record<string, number> | null;
|
||||
|
||||
@Column({ name: 'requires_director_approval', type: 'boolean', default: false })
|
||||
requiresDirectorApproval!: boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user