Files
edr-platform/apps/edr-freight-api/src/modules/rule-engine/entities/yard.entity.ts
2026-05-30 10:27:59 +03:00

24 lines
664 B
TypeScript

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;
}