2022-06-20 23:29:21 +08:00
|
|
|
import { Database, Model, Op } from '@nocobase/database';
|
2022-05-21 21:52:30 +08:00
|
|
|
import { HasManyCountAssociationsMixin, HasManyCreateAssociationMixin, HasManyGetAssociationsMixin, Transactionable } from 'sequelize';
|
2022-02-27 22:58:41 +08:00
|
|
|
|
2022-01-28 00:25:26 +08:00
|
|
|
import ExecutionModel from './Execution';
|
|
|
|
import FlowNodeModel from './FlowNode';
|
|
|
|
|
2022-06-20 23:29:21 +08:00
|
|
|
|
2022-01-28 00:25:26 +08:00
|
|
|
export default class WorkflowModel extends Model {
|
|
|
|
declare static database: Database;
|
|
|
|
|
|
|
|
declare id: number;
|
2022-06-09 16:40:10 +08:00
|
|
|
declare key: string;
|
2022-01-28 00:25:26 +08:00
|
|
|
declare title: string;
|
|
|
|
declare enabled: boolean;
|
2022-06-09 16:40:10 +08:00
|
|
|
declare current: boolean;
|
2022-01-28 00:25:26 +08:00
|
|
|
declare description?: string;
|
|
|
|
declare type: string;
|
|
|
|
declare config: any;
|
2022-04-14 00:05:13 +08:00
|
|
|
declare useTransaction: boolean;
|
2022-05-22 19:47:15 +08:00
|
|
|
declare executed: number;
|
2022-01-28 00:25:26 +08:00
|
|
|
|
|
|
|
declare createdAt: Date;
|
|
|
|
declare updatedAt: Date;
|
|
|
|
|
|
|
|
declare nodes: FlowNodeModel[];
|
|
|
|
declare getNodes: HasManyGetAssociationsMixin<FlowNodeModel>;
|
|
|
|
declare createNode: HasManyCreateAssociationMixin<FlowNodeModel>;
|
|
|
|
|
|
|
|
declare executions: ExecutionModel[];
|
2022-04-29 22:21:58 +08:00
|
|
|
declare countExecutions: HasManyCountAssociationsMixin;
|
2022-01-28 00:25:26 +08:00
|
|
|
declare getExecutions: HasManyGetAssociationsMixin<ExecutionModel>;
|
|
|
|
declare createExecution: HasManyCreateAssociationMixin<ExecutionModel>;
|
2022-01-09 22:22:26 +08:00
|
|
|
}
|