diff --git a/src/commands/form/_blindspots.ts b/src/commands/form/_blindspots.ts index 871c0c4..06caa3c 100644 --- a/src/commands/form/_blindspots.ts +++ b/src/commands/form/_blindspots.ts @@ -105,4 +105,18 @@ export function checkBs32(formDataRaw: unknown): BlindspotIssue[] { } }) return issues +} + +export function checkBs15(tablesRaw: unknown, enableFlow: number | undefined): BlindspotIssue[] { + if (enableFlow !== 1) return [] + const issues: BlindspotIssue[] = [] + const tables = safeParse(tablesRaw) as Array<{ table?: string; fields?: Array<{ field: string }> }> | null + if (!tables) return issues + for (const t of tables) { + const hasFlowTaskId = t.fields?.some(f => f.field === 'f_flow_task_id') + if (!hasFlowTaskId) { + issues.push({ id: 'BS-15', level: 'ERROR', path: `tables.${t.table || '?'}.fields`, message: 'enableFlow=1 必须含 f_flow_task_id 列' }) + } + } + return issues } \ No newline at end of file