feat: 新增工作流执行模块
新增流程执行记录的实体、DTO、DAO、控制器和服务层,支持工作流的执行、回调及结果树状列表查询;同时更新服务名称为 ai-agent。
This commit is contained in:
41
workflow/model/entity/flow_template.go
Normal file
41
workflow/model/entity/flow_template.go
Normal file
@@ -0,0 +1,41 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"ai-agent/workflow/consts/flow"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
type FlowTemplate struct {
|
||||
beans.SQLBaseDO `orm:",inherit"` // 嵌入基础字段:Id, TenantId, Creator, CreatedAt, Updater, UpdatedAt, DeletedAt
|
||||
// 业务字段
|
||||
FlowTemplateName string `orm:"flow_template_name" json:"flowTemplateName" description:"流程模板名称"`
|
||||
Description string `orm:"description" json:"description" description:"流程描述"`
|
||||
CategoryCode string `orm:"category_code" json:"categoryCode" description:"流程分类"`
|
||||
CategoryName string `orm:"category_name" json:"categoryName" description:"流程分类名称"`
|
||||
FlowContent *FlowInfo `orm:"flow_content" json:"flowContent" description:"流程内容"`
|
||||
NodeInputParams []*FlowNode `orm:"node_input_params" json:"nodeInputParams" description:"节点输入参数"`
|
||||
Status flow.FlowTemplateStatus `orm:"status" json:"status" description:"流程状态:1启用/0停用"`
|
||||
}
|
||||
|
||||
type flowTemplateCol struct {
|
||||
beans.SQLBaseCol
|
||||
FlowTemplateName string
|
||||
Description string
|
||||
CategoryCode string
|
||||
CategoryName string
|
||||
FlowContent string
|
||||
NodeInputParams string
|
||||
Status string
|
||||
}
|
||||
|
||||
var FlowTemplateCol = flowTemplateCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
FlowTemplateName: "flow_template_name",
|
||||
Description: "description",
|
||||
CategoryCode: "category_code",
|
||||
CategoryName: "category_name",
|
||||
FlowContent: "flow_content",
|
||||
NodeInputParams: "node_input_params",
|
||||
Status: "status",
|
||||
}
|
||||
Reference in New Issue
Block a user