mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 09:30:59 +00:00
24 lines
791 B
TypeScript
24 lines
791 B
TypeScript
import { BaseEntity } from '@edr/api-common';
|
|
import { Column, Entity, Index, Unique } from 'typeorm';
|
|
|
|
@Entity({ schema: 'freight', name: 'approval_rules' })
|
|
@Unique(['requiresDirectorApproval', 'stepOrder'])
|
|
@Index(['requiresDirectorApproval'])
|
|
@Index(['stepOrder'])
|
|
export class ApprovalRule extends BaseEntity {
|
|
@Column({ name: 'requires_director_approval', type: 'boolean' })
|
|
requiresDirectorApproval!: boolean;
|
|
|
|
@Column({ name: 'step_order', type: 'smallint' })
|
|
stepOrder!: number;
|
|
|
|
@Column({ name: 'required_role', type: 'varchar', length: 30 })
|
|
requiredRole!: string;
|
|
|
|
@Column({ name: 'action_label', type: 'varchar', length: 50 })
|
|
actionLabel!: string;
|
|
|
|
@Column({ name: 'blocks_role', type: 'varchar', length: 30, nullable: true })
|
|
blocksRole?: string | null;
|
|
}
|