import { BaseEntity } from '@edr/api-common'; import { Column, Entity, Index } from 'typeorm'; @Entity({ schema: 'freight', name: 'yards' }) @Index(['code']) @Index(['country']) @Index(['isActive']) export class Yard extends BaseEntity { @Column({ name: 'code', type: 'varchar', length: 20, unique: true }) code!: string; @Column({ name: 'label', type: 'varchar', length: 100 }) label!: string; @Column({ name: 'country', type: 'varchar', length: 50 }) country!: string; @Column({ name: 'is_active', type: 'boolean', default: true }) isActive!: boolean; @Column({ name: 'display_order', type: 'int', default: 1 }) displayOrder!: number; }