n8n/packages/cli/src/databases/mongodb/WorkflowEntity.ts
2019-06-24 10:30:46 +02:00

49 lines
601 B
TypeScript

import {
IConnections,
IDataObject,
INode,
IWorkflowSettings,
} from 'n8n-workflow';
import {
IWorkflowDb,
} from '../../';
import {
Column,
Entity,
ObjectID,
ObjectIdColumn,
} from "typeorm";
@Entity()
export class WorkflowEntity implements IWorkflowDb {
@ObjectIdColumn()
id: ObjectID;
@Column()
name: string;
@Column()
active: boolean;
@Column('json')
nodes: INode[];
@Column('json')
connections: IConnections;
@Column()
createdAt: number;
@Column()
updatedAt: number;
@Column('json')
settings?: IWorkflowSettings;
@Column('json')
staticData?: IDataObject;
}