import { BaseEntity } from '@edr/api-common';
import { Column, Entity } from 'typeorm';

@Entity({ schema: 'freight', name: 'train_scheduling_global_rules' })
export class TrainSchedulingGlobalRules extends BaseEntity {
  @Column({
    name: 'max_train_length_meters',
    type: 'numeric',
    precision: 10,
    scale: 2,
    default: 760,
  })
  maxTrainLengthMeters!: number;

  @Column({
    name: 'max_train_weight_tons',
    type: 'numeric',
    precision: 10,
    scale: 3,
    default: 3500,
  })
  maxTrainWeightTons!: number;

  @Column({ name: 'max_wagons_per_train', type: 'int', default: 53 })
  maxWagonsPerTrain!: number;

  @Column({
    name: 'max_20ft_container_weight_tons',
    type: 'numeric',
    precision: 8,
    scale: 3,
    default: 30,
  })
  max20ftContainerWeightTons!: number;

  @Column({
    name: 'max_20ft_pair_weight_diff_tons',
    type: 'numeric',
    precision: 8,
    scale: 3,
    default: 10,
  })
  max20ftPairWeightDiffTons!: number;
}
