From 2aec7fe30faadc8d621bbb223a31e376a0e1f18a Mon Sep 17 00:00:00 2001 From: qhd <1766646056@qq.com> Date: Fri, 8 May 2026 11:51:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=88=9B=E4=BD=9C?= =?UTF-8?q?=E4=BD=9C=E5=93=81=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E5=8F=8A?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/consts/public/table_name.go | 15 +++++++++++++++ workflow/consts/table_name.go | 11 ----------- workflow/dao/creation_info_dao.go | 6 +++--- 3 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 workflow/consts/public/table_name.go delete mode 100644 workflow/consts/table_name.go diff --git a/workflow/consts/public/table_name.go b/workflow/consts/public/table_name.go new file mode 100644 index 0000000..ff0229f --- /dev/null +++ b/workflow/consts/public/table_name.go @@ -0,0 +1,15 @@ +package public + +// 数据库名称 +const ( + DbNameBlackDeacon = "black_deacon" +) + +// 数据库表名 +const ( + TableNameCreationInfo = "creation_info" + TableNameFlowExecution = "flow_execution" + TableNameFlowUser = "flow_user" + TableNameSkillTemplate = "skill_template" + TableNameSkillUser = "skill_user" +) diff --git a/workflow/consts/table_name.go b/workflow/consts/table_name.go deleted file mode 100644 index ddffdf2..0000000 --- a/workflow/consts/table_name.go +++ /dev/null @@ -1,11 +0,0 @@ -package consts - -// 数据库名称 -const ( - DbNameBlackDeacon = "black_deacon" -) - -// 数据库表名 -const ( - TableNameCreationInfo = "creation_info" -) diff --git a/workflow/dao/creation_info_dao.go b/workflow/dao/creation_info_dao.go index acba202..0941ea6 100644 --- a/workflow/dao/creation_info_dao.go +++ b/workflow/dao/creation_info_dao.go @@ -1,7 +1,7 @@ package dao import ( - "ai-agent/workflow/consts" + "ai-agent/workflow/consts/public" "ai-agent/workflow/model/dto" "ai-agent/workflow/model/entity" "context" @@ -15,7 +15,7 @@ var CreationInfoDao = &creationInfoDao{} type creationInfoDao struct{} func (d *creationInfoDao) List(ctx context.Context, req *dto.ListCreationInfoReq, fields ...string) (res []*entity.CreationInfo, total int, err error) { - model := gfdb.DB(ctx, consts.DbNameBlackDeacon).Model(ctx, consts.TableNameCreationInfo).Fields(fields).OmitEmpty() + model := gfdb.DB(ctx, public.DbNameBlackDeacon).Model(ctx, public.TableNameCreationInfo).Fields(fields).OmitEmpty() model.Where(entity.CreationInfoCol.Creator, req.Creator) model.OrderDesc(entity.CreationInfoCol.CreatedAt) if req.Page != nil { @@ -35,7 +35,7 @@ func (d *creationInfoDao) Insert(ctx context.Context, req *dto.Create) (id int64 if err = gconv.Struct(req, e); err != nil { return } - r, err := gfdb.DB(ctx, consts.DbNameBlackDeacon).Model(ctx, consts.TableNameCreationInfo).Insert(e) + r, err := gfdb.DB(ctx, public.DbNameBlackDeacon).Model(ctx, public.TableNameCreationInfo).Insert(e) if err != nil { return }