mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 12:41:04 +00:00
23 lines
722 B
TypeScript
23 lines
722 B
TypeScript
import { BaseEntity } from '@edr/api-common';
|
|
import { Column, Entity, Index } from 'typeorm';
|
|
|
|
@Entity({ schema: 'freight', name: 'priority_rules' })
|
|
@Index(['code'])
|
|
@Index(['isActive'])
|
|
export class PriorityRule extends BaseEntity {
|
|
@Column({ name: 'code', type: 'varchar', length: 40, unique: true })
|
|
code!: string;
|
|
|
|
@Column({ name: 'label', type: 'varchar', length: 100, nullable: true })
|
|
label!: string;
|
|
|
|
@Column({ name: 'score', type: 'int', default: 0, nullable: true })
|
|
score!: number;
|
|
|
|
@Column({ name: 'condition_currency', type: 'varchar', length: 5, nullable: true })
|
|
conditionCurrency?: string | null;
|
|
|
|
@Column({ name: 'is_active', type: 'boolean', default: false })
|
|
isActive!: boolean;
|
|
}
|