dify/api/models/workflow.py文件中的数据表

源码位置:dify/api/models/workflow.py

Workflow 表结构

字段英文名 数据类型 字段中文名字 备注
id StringUUID ID UUID生成
tenant_id StringUUID 工作区ID 非空
app_id StringUUID 应用ID 非空
type String 工作流类型 非空
version String 版本 非空
graph Text 工作流画布配置 JSON格式,包含节点和边的配置
features Text 功能 JSON格式
created_by StringUUID 创建者ID 非空
created_at DateTime 创建时间 当前时间
updated_by StringUUID 更新者ID 可选
updated_at DateTime 更新时间 可选

WorkflowRun 表结构

字段英文名 数据类型 字段中文名字 备注
id StringUUID ID UUID生成
tenant_id StringUUID 工作区ID 非空
app_id StringUUID 应用ID 非空
sequence_number Integer 序列号 非空,应用内自增
workflow_id StringUUID 工作流ID 非空
type String 工作流类型 非空
triggered_from String 触发来源 非空
version String 版本 非空
graph Text 工作流画布配置 JSON格式
inputs Text 输入参数 JSON格式
status String 执行状态 非空
outputs Text 输出内容 可选,JSON格式
error Text 错误原因 可选
elapsed_time Float 耗时 非空,默认0
total_tokens Integer 总token数量 非空,默认0
total_steps Integer 总步骤数量 默认0
created_by_role String 创建者角色 非空
created_by StringUUID 创建者ID 非空
created_at DateTime 创建时间 当前时间
finished_at DateTime 结束时间 可选

WorkflowNodeExecution 表结构

字段英文名 数据类型 字段中文名字 备注
id StringUUID ID UUID生成
tenant_id StringUUID 工作区ID 非空
app_id StringUUID 应用ID 非空
workflow_id StringUUID 工作流ID 非空
triggered_from String 触发来源 非空
workflow_run_id StringUUID 工作流运行ID 可选
index Integer 执行序列号 非空
predecessor_node_id String 前置节点ID 可选
node_id String 节点ID 非空
node_type String 节点类型 非空
title String 节点标题 非空
inputs Text 输入参数 JSON格式
process_data Text 处理数据 JSON格式
outputs Text 输出变量 可选,JSON格式
status String 执行状态 非空
error Text 错误原因 可选
elapsed_time Float 耗时 非空,默认0
execution_metadata Text 执行元数据 JSON格式
created_at DateTime 创建时间 当前时间
created_by_role String 创建者角色 非空
created_by StringUUID 创建者ID 非空
finished_at DateTime 结束时间 可选

WorkflowAppLog 表结构

字段英文名 数据类型 字段中文名字 备注
id StringUUID ID UUID生成
tenant_id StringUUID 工作区ID 非空
app_id StringUUID 应用ID 非空
workflow_id StringUUID 工作流ID 非空
workflow_run_id StringUUID 工作流运行ID 非空
created_from String 创建来源 非空
created_by_role String 创建者角色 非空
created_by StringUUID 创建者ID 非空
created_at DateTime 创建时间 当前时间

上述表格详细说明了每个表的字段名称、数据类型、字段中文名称和备注。

相关推荐
gc_22995 天前
学习在Windows中基于Docker部署Dify的步骤
windows·docker·dify
User_芊芊君子6 天前
蓝耘元生代×魔珐星云:我用蓝耘MaaS大模型搭建一款共情具身智能数字人
人工智能·dify·蓝耘
腾飞开源6 天前
05_Dify接入Ollama本地大模型
人工智能·项目实战·dify·ai智能体·ollama·企业级应用·接入模型
腾飞开源7 天前
06_Dify接入阿里云百炼API大模型
人工智能·项目实战·dify·ai智能体·ai应用开发·阿里云百炼·接入大模型
m_sophia7 天前
Dify整合MCP查询火车票
dify
tangzzzfan8 天前
如何写好一个 Skill:划分、结构与实践
agent·workflow
李燚8 天前
Graph 编排:不只是 ReAct 的通用 DAG
agent·workflow·graph·ai-agent·dag
李燚10 天前
Workflow 编排:字段映射、数据流分离
agent·chain·workflow·graph·aiagent·eino
leeyi10 天前
Workflow 编排:字段映射、数据流分离
langchain·workflow·graphql
李燚11 天前
Chain 编排:线性流、并行、Passthrough
agent·chain·workflow·graph·ai-agent