feat: 新增工作流执行模块
新增流程执行记录的实体、DTO、DAO、控制器和服务层,支持工作流的执行、回调及结果树状列表查询;同时更新服务名称为 ai-agent。
This commit is contained in:
28
workflow/consts/flow/flow_execution_status.go
Normal file
28
workflow/consts/flow/flow_execution_status.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package flow
|
||||
|
||||
import "github.com/gogf/gf/v2/util/gconv"
|
||||
|
||||
var (
|
||||
FlowExecutionStatusRunning = newFlowExecutionStatus(gconv.PtrInt8(1), "running") // 运行中
|
||||
FlowExecutionStatusSuccess = newFlowExecutionStatus(gconv.PtrInt8(2), "success") // 成功
|
||||
FlowExecutionStatusFailed = newFlowExecutionStatus(gconv.PtrInt8(3), "failed") // 失败
|
||||
FlowExecutionStatusPaused = newFlowExecutionStatus(gconv.PtrInt8(4), "paused") // 暂停
|
||||
)
|
||||
|
||||
type FlowExecutionStatus *int8
|
||||
|
||||
type flowExecutionStatus struct {
|
||||
code FlowExecutionStatus
|
||||
desc string
|
||||
}
|
||||
|
||||
func (s flowExecutionStatus) Code() FlowExecutionStatus {
|
||||
return s.code
|
||||
}
|
||||
func (s flowExecutionStatus) Desc() string {
|
||||
return s.desc
|
||||
}
|
||||
|
||||
func newFlowExecutionStatus(code FlowExecutionStatus, desc string) flowExecutionStatus {
|
||||
return flowExecutionStatus{code: code, desc: desc}
|
||||
}
|
||||
Reference in New Issue
Block a user