流程设计

This commit is contained in:
2026-07-20 12:29:07 +08:00 Unverified
parent c5446d5241
commit 4c7fafc03d
13 changed files with 240 additions and 54 deletions
+6 -1
View File
@@ -53,7 +53,7 @@ function buildSeedOperations(state) {
const nullable = value => value == null || value === '' ? null : value;
add(
'UPDATE schema_metadata SET schema_version = 7, app_version = ?, self_registration_enabled = ?, created_at = ? WHERE id = 1',
'UPDATE schema_metadata SET schema_version = 8, app_version = ?, self_registration_enabled = ?, created_at = ? WHERE id = 1',
Number(state.meta?.version || 1), state.settings?.selfRegistrationEnabled ? 1 : 0,
state.meta?.createdAt || new Date().toISOString()
);
@@ -974,6 +974,11 @@ function createRepository({ client, location, read, transaction, close }) {
if (log) operations.push(auditOperation(log));
await transaction(operations);
},
async createWorkflow(instance, action, log = null) {
const operations = workflowCreateOperations(instance, action);
if (log) operations.push(auditOperation(log));
await transaction(operations);
},
async saveWorkflow(workflow, log) {
const operations = [
operation(