Files
edr-platform/apps/edr-freight-api/src/modules/train-schedules/entities/train-composition-removal-log.entity.ts
2026-06-13 18:28:39 +00:00

23 lines
808 B
TypeScript

import { Column, Entity, Index } from 'typeorm';
import { BaseEntity } from '@edr/api-common';
@Entity({ schema: 'freight', name: 'train_composition_removal_logs' })
@Index(['scheduleId'])
export class TrainCompositionRemovalLog extends BaseEntity {
@Column({ name: 'schedule_id', type: 'uuid' }) scheduleId!: string;
@Column({ name: 'booking_id', type: 'uuid' }) bookingId!: string;
@Column({ name: 'booking_reference', type: 'varchar', length: 64, nullable: true })
bookingReference?: string | null;
@Column({ name: 'removed_by_user_id', type: 'uuid', nullable: true })
removedByUserId?: string | null;
@Column({ name: 'removed_at', type: 'timestamptz', default: () => 'NOW()' })
removedAt!: Date;
@Column({ name: 'notes', type: 'text', nullable: true })
notes?: string | null;
}