Files
ai-agent/workflow/model/dto/flow/flow_user_dto.go
2026-06-10 15:29:21 +08:00

81 lines
3.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package flow
import (
"ai-agent/workflow/consts/flow"
"ai-agent/workflow/model/entity"
"gitea.redpowerfuture.com/red-future/common/beans"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
type CreateFlowUserReq struct {
g.Meta `path:"/create" method:"post" tags:"用户流程管理" summary:"创建用户流程" dc:"创建用户流程"`
FlowName string `json:"flowName" description:"流程名称"`
Description string `json:"description" description:"流程描述"`
FlowContent *entity.FlowInfo `json:"flowContent" description:"流程内容"`
NodeInputParams []*entity.FlowNode `json:"nodeInputParams" description:"节点输入参数"`
AccessLevel flow.FlowUserAccessLevel `json:"accessLevel" description:"访问权限1私有2团队3公开"`
SourceFlowTemplateId int64 `json:"sourceFlowTemplateId" description:"来源流程模板ID"`
}
type CreateFlowUserRes struct {
Id int64 `json:"id,string"`
}
type UpdateFlowUserReq struct {
g.Meta `path:"/update" method:"put" tags:"用户流程管理" summary:"更新用户流程" dc:"更新用户流程"`
Id int64 `json:"id" v:"required#ID不能为空"`
FlowName string `json:"flowName" description:"流程名称"`
Description string `json:"description" description:"流程描述"`
FlowContent *entity.FlowInfo `json:"flowContent" description:"流程内容"`
NodeInputParams []*entity.FlowNode `json:"nodeInputParams" description:"节点输入参数"`
AccessLevel flow.FlowUserAccessLevel `json:"accessLevel" description:"访问权限1私有2团队3公开"`
SourceFlowTemplateId int64 `json:"sourceFlowTemplateId" description:"来源流程模板ID"`
}
type DeleteFlowUserReq struct {
g.Meta `path:"/delete" method:"delete" tags:"用户流程管理" summary:"删除用户流程" dc:"删除用户流程"`
Id int64 `json:"id" v:"required#ID不能为空"`
}
type GetFlowUserReq struct {
g.Meta `path:"/get" method:"get" tags:"用户流程管理" summary:"获取用户流程详情" dc:"获取用户流程详情"`
Id int64 `json:"id" v:"required#ID不能为空"`
}
type ListFlowUserReq struct {
g.Meta `path:"/list" method:"get" tags:"用户流程管理" summary:"获取用户流程列表" dc:"分页查询用户流程列表,支持多条件筛选"`
Page *beans.Page `json:"page"`
Creator string `json:"creator"`
Keyword string `json:"keyword" dc:"关键词搜索"`
}
type ListFlowUserRes struct {
List []*FlowUserVO `json:"list"`
Total int `json:"total"`
}
type FlowUserVO struct {
Id int64 `json:"id,string" dc:"id"`
FlowName string `json:"flowName" description:"流程名称"`
Description string `json:"description" description:"流程描述"`
FlowContent *entity.FlowInfo `json:"flowContent" description:"流程内容"`
NodeInputParams []*entity.FlowNode `json:"nodeInputParams" description:"节点输入参数"`
AccessLevel flow.FlowUserAccessLevel `json:"accessLevel" description:"访问权限1私有2团队3公开"`
SourceFlowTemplateId int64 `json:"sourceFlowTemplateId,string" description:"来源流程模板ID"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
}
type ListFlowRes struct {
ListFlowUserRes *ListFlowUserRes `json:"listFlowUserRes"`
ListFlowTemplateRes *ListFlowTemplateRes `json:"listFlowTemplateRes"`
IsAdmin bool `json:"isAdmin"`
}