mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
22 lines
780 B
TypeScript
22 lines
780 B
TypeScript
import { BaseEntity } from '@edr/api-common';
|
|
import { Column, Entity, Index, JoinColumn, ManyToOne } from 'typeorm';
|
|
import { ContainerType } from './container-type.entity';
|
|
|
|
@Entity({ schema: 'freight', name: 'weight_limit_rules' })
|
|
@Index(['containerTypeId'])
|
|
@Index(['tradeDirection'])
|
|
export class WeightLimitRule extends BaseEntity {
|
|
@Column({ name: 'container_type_id', type: 'uuid' })
|
|
containerTypeId!: string;
|
|
|
|
@ManyToOne(() => ContainerType, (ct) => ct.weightLimitRules)
|
|
@JoinColumn({ name: 'container_type_id' })
|
|
containerType!: ContainerType;
|
|
|
|
@Column({ name: 'trade_direction', type: 'varchar', length: 10 })
|
|
tradeDirection!: string;
|
|
|
|
@Column({ name: 'max_vgm_tons', type: 'numeric', precision: 8, scale: 3, nullable: true })
|
|
maxVgmTons!: number;
|
|
}
|