feat(dacli): 迁移 BS-15 f_flow_task_id 检查
This commit is contained in:
1 parent
f7deff05bb
commit
9f265f16b3
1 file changed
+14
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user