mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 22:58:17 +00:00
implement intercity booking management and booking window websocket integration
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { BaseEntity } from '@edr/api-common';
|
||||
import type { ScheduleTradeDirection } from '@edr/types';
|
||||
import { Column, Entity, Index, JoinColumn, ManyToOne, OneToMany } from 'typeorm';
|
||||
|
||||
import { Yard } from '../../rule-engine/entities/yard.entity';
|
||||
@@ -26,6 +27,14 @@ export class Route extends BaseEntity {
|
||||
@Column({ name: 'status', type: 'varchar', length: 32, default: 'AVAILABLE' })
|
||||
status!: RouteStatus;
|
||||
|
||||
/**
|
||||
* Trade direction frozen from the yard countries at create/update
|
||||
* (ET→DJ = EXPORT, DJ→ET = IMPORT, same country = DOMESTIC/"Intercity").
|
||||
* Consumers (scheduling, booking windows) read this instead of re-deriving.
|
||||
*/
|
||||
@Column({ name: 'direction', type: 'varchar', length: 10 })
|
||||
direction!: ScheduleTradeDirection;
|
||||
|
||||
@OneToMany(() => RouteMilestone, (milestone) => milestone.route, { cascade: false })
|
||||
milestones?: RouteMilestone[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user