UNPKG

@medusajs/workflow-engine-inmemory

Version:

Medusa Workflow Orchestrator module

40 lines 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WorkflowExecution = void 0; const orchestration_1 = require("@medusajs/framework/orchestration"); const utils_1 = require("@medusajs/framework/utils"); exports.WorkflowExecution = utils_1.model .define("workflow_execution", { id: utils_1.model.id({ prefix: "wf_exec" }), workflow_id: utils_1.model.text().primaryKey(), transaction_id: utils_1.model.text().primaryKey(), run_id: utils_1.model.text().primaryKey(), execution: utils_1.model.json().nullable(), context: utils_1.model.json().nullable(), state: utils_1.model.enum(orchestration_1.TransactionState), retention_time: utils_1.model.number().nullable(), }) .indexes([ { on: ["id"], where: "deleted_at IS NULL", }, { on: ["workflow_id"], where: "deleted_at IS NULL", }, { on: ["transaction_id"], where: "deleted_at IS NULL", }, { on: ["workflow_id", "transaction_id", "run_id"], unique: true, where: "deleted_at IS NULL", }, { on: ["state"], where: "deleted_at IS NULL", }, ]); //# sourceMappingURL=workflow-execution.js.map