refactor(core): Standardize filename casing for controllers and databases (no-changelog) (#10564)
This commit is contained in:
70
packages/cli/src/databases/entities/execution-entity.ts
Normal file
70
packages/cli/src/databases/entities/execution-entity.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
import { ExecutionStatus, WorkflowExecuteMode } from 'n8n-workflow';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
Generated,
|
||||
Index,
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
OneToOne,
|
||||
PrimaryColumn,
|
||||
Relation,
|
||||
DeleteDateColumn,
|
||||
} from '@n8n/typeorm';
|
||||
import { datetimeColumnType } from './abstract-entity';
|
||||
import { idStringifier } from '../utils/transformers';
|
||||
import type { ExecutionData } from './execution-data';
|
||||
import type { ExecutionMetadata } from './execution-metadata';
|
||||
import { WorkflowEntity } from './workflow-entity';
|
||||
|
||||
@Entity()
|
||||
@Index(['workflowId', 'id'])
|
||||
@Index(['waitTill', 'id'])
|
||||
@Index(['finished', 'id'])
|
||||
@Index(['workflowId', 'finished', 'id'])
|
||||
@Index(['workflowId', 'waitTill', 'id'])
|
||||
export class ExecutionEntity {
|
||||
@Generated()
|
||||
@PrimaryColumn({ transformer: idStringifier })
|
||||
id: string;
|
||||
|
||||
@Column()
|
||||
finished: boolean;
|
||||
|
||||
@Column('varchar')
|
||||
mode: WorkflowExecuteMode;
|
||||
|
||||
@Column({ nullable: true })
|
||||
retryOf: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
retrySuccessId: string;
|
||||
|
||||
@Column('varchar')
|
||||
status: ExecutionStatus;
|
||||
|
||||
@Column(datetimeColumnType)
|
||||
startedAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({ type: datetimeColumnType, nullable: true })
|
||||
stoppedAt: Date;
|
||||
|
||||
@DeleteDateColumn({ type: datetimeColumnType, nullable: true })
|
||||
deletedAt: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
workflowId: string;
|
||||
|
||||
@Column({ type: datetimeColumnType, nullable: true })
|
||||
waitTill: Date | null;
|
||||
|
||||
@OneToMany('ExecutionMetadata', 'execution')
|
||||
metadata: ExecutionMetadata[];
|
||||
|
||||
@OneToOne('ExecutionData', 'execution')
|
||||
executionData: Relation<ExecutionData>;
|
||||
|
||||
@ManyToOne('WorkflowEntity')
|
||||
workflow: WorkflowEntity;
|
||||
}
|
||||
Reference in New Issue
Block a user