This commit is contained in:
孟帅
2024-04-22 23:08:40 +08:00
parent 82483bd7b9
commit e144b12580
445 changed files with 17457 additions and 6708 deletions

View File

@@ -18,6 +18,8 @@ import (
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"hotgo/utility/validate"
@{ if eq .options.Step.HasHookMemberSummary true }"hotgo/internal/library/hgorm/hook"@{end}
@{ if eq .options.Step.IsTreeTable true }"hotgo/utility/tree"@{end}
)
@{ if eq .options.Step.HasEdit true }
// @{.varName}UpdateFields 修改@{.tableComment}字段过滤
@@ -65,7 +67,7 @@ func (in *@{.varName}ViewInp) Filter(ctx context.Context) (err error) {
}
type @{.varName}ViewModel struct {
entity.@{.daoName}
@{.viewModelColumns}
}@{end}
// @{.varName}ListInp 获取@{.tableComment}列表
@@ -138,4 +140,28 @@ func (in *@{.varName}SwitchInp) Filter(ctx context.Context) (err error) {
}
type @{.varName}SwitchModel struct{}
@{end}
@{end}
@{ if eq .options.Step.IsTreeTable true }
// @{.varName}TreeOption 关系树选项
type @{.varName}TreeOption struct {
@{.treeOptionFields}
Children []tree.Node `json:"children" dc:"子节点"`
}
// ID 获取节点ID
func (t *@{.varName}TreeOption) ID() int64 {
return t.@{.pk.GoName}
}
// PID 获取父级节点ID
func (t *@{.varName}TreeOption) PID() int64 {
return t.Pid
}
// SetChildren 设置子节点数据
func (t *@{.varName}TreeOption) SetChildren(children []tree.Node) {
t.Children = children
}
@{end}