mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 07:38:10 +00:00
add reference field to train schedules and implement unique sequence generation
This commit is contained in:
@@ -61,6 +61,12 @@ export class TrainSchedule extends BaseEntity {
|
||||
@Column({ name: 'train_number', type: 'varchar', length: 20, nullable: true })
|
||||
trainNumber?: string | null;
|
||||
|
||||
// Human-facing unique schedule reference (S-YYYY-NNNNN). Shown on the schedule
|
||||
// list, booking windows, and load lists. Assigned at creation from the highest
|
||||
// sequence issued this year (see TrainSchedulesRepository.maxReferenceSequence).
|
||||
@Column({ name: 'reference', type: 'varchar', length: 20, nullable: true, unique: true })
|
||||
reference?: string | null;
|
||||
|
||||
@Column({ name: 'direction', type: 'varchar', length: 10, nullable: true })
|
||||
direction?: string | null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user