发布代码生成、更新20+表单组件,优化数据字典,gf版本更新到2.3.1

This commit is contained in:
孟帅
2023-01-18 16:23:39 +08:00
parent 50207ded90
commit 87c27a17a3
386 changed files with 27926 additions and 44297 deletions

View File

@@ -96,6 +96,6 @@ type ConfigListInp struct {
type ConfigListModel struct {
entity.SysConfig
DeptName string `json:"dept_name"`
RoleName string `json:"role_name"`
DeptName string `json:"deptName"`
RoleName string `json:"roleName"`
}

View File

@@ -0,0 +1,109 @@
// Package sysin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
// @AutoGenerate Version 2.1.0
// @AutoGenerate Date 2023-01-18 15:19:42
//
package sysin
import (
"context"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"github.com/gogf/gf/v2/os/gtime"
)
// CurdDemoEditInp 修改/新增生成演示
type CurdDemoEditInp struct {
entity.Test
}
func (in *CurdDemoEditInp) Filter(ctx context.Context) (err error) {
return
}
type CurdDemoEditModel struct{}
// CurdDemoDeleteInp 删除生成演示
type CurdDemoDeleteInp struct {
Id interface{} `json:"id" v:"required#ID不能为空" dc:"ID"`
}
type CurdDemoDeleteModel struct{}
// CurdDemoViewInp 获取指定生成演示信息
type CurdDemoViewInp struct {
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
}
type CurdDemoViewModel struct {
entity.Test
}
// CurdDemoListInp 获取生成演示列表
type CurdDemoListInp struct {
form.PageReq
Id int64 `json:"id" dc:"ID"`
Status int `json:"status" dc:"状态"`
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
TestCategoryName string `json:"testCategoryName" dc:"分类名称"`
}
type CurdDemoListModel struct {
Id int64 `json:"id" dc:"ID"`
CategoryId int64 `json:"categoryId" dc:"分类ID"`
Title string `json:"title" dc:"标题"`
Description string `json:"description" dc:"描述"`
Image string `json:"image" dc:"单图"`
Attachfile string `json:"attachfile" dc:"附件"`
Switch int `json:"switch" dc:"显示开关"`
Sort int `json:"sort" dc:"排序"`
Status int `json:"status" dc:"状态"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
TestCategoryName string `json:"testCategoryName" dc:"分类名称"`
}
func (in *CurdDemoListInp) Filter(ctx context.Context) (err error) {
return
}
// CurdDemoExportModel 导出生成演示
type CurdDemoExportModel struct {
Id int64 `json:"id" dc:"ID"`
CategoryId int64 `json:"categoryId" dc:"分类ID"`
Title string `json:"title" dc:"标题"`
Description string `json:"description" dc:"描述"`
Image string `json:"image" dc:"单图"`
Attachfile string `json:"attachfile" dc:"附件"`
Switch int `json:"switch" dc:"显示开关"`
Sort int `json:"sort" dc:"排序"`
Status int `json:"status" dc:"状态"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
TestCategoryName string `json:"testCategoryName" dc:"分类名称"`
}
// CurdDemoMaxSortInp 获取生成演示最大排序
type CurdDemoMaxSortInp struct{}
type CurdDemoMaxSortModel struct {
Sort int `json:"sort" description:"排序"`
}
// CurdDemoStatusInp 更新生成演示状态
type CurdDemoStatusInp struct {
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
Status int `json:"status" dc:"状态"`
}
type CurdDemoStatusModel struct{}
// CurdDemoSwitchInp 更新生成演示开关状态
type CurdDemoSwitchInp struct {
form.SwitchReq
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
}
type CurdDemoSwitchModel struct{}

View File

@@ -35,6 +35,23 @@ type DictDataListInp struct {
}
type DictDataListModel struct {
TypeID int64 `json:"typeId"`
TypeID int64 `json:"typeId"`
Key string `json:"key"`
entity.SysDictData
}
// DataSelectInp 获取指定字典选项
type DataSelectInp struct {
Type string
}
type DataSelectModel []*SelectData
type SelectData struct {
Key interface{} `json:"key"`
Label string `json:"label" description:"字典标签"`
Value interface{} `json:"value" description:"字典键值"`
ValueType string `json:"valueType" description:"键值数据类型string,int,uint,bool,datetime,date"`
Type string `json:"type" description:"字典类型"`
ListClass string `json:"listClass" description:"表格回显样式"`
}

View File

@@ -28,3 +28,9 @@ type DictTypeSelectInp struct {
}
type DictTypeSelectModel []g.Map
// DictTreeSelectInp 获取类型关系树选项
type DictTreeSelectInp struct {
}
type DictTreeSelectModel []g.Map

View File

@@ -0,0 +1,139 @@
// Package sysin
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2022 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package sysin
import (
"hotgo/internal/model"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
)
// GenCodesMaxSortInp 最大排序
type GenCodesMaxSortInp struct {
Id int64
}
type GenCodesMaxSortModel struct {
Sort int
}
// GenCodesEditInp 修改/新增数据
type GenCodesEditInp struct {
entity.SysGenCodes
}
type GenCodesEditModel struct {
entity.SysGenCodes
}
// GenCodesDeleteInp 删除
type GenCodesDeleteInp struct {
Id interface{}
}
type GenCodesDeleteModel struct{}
// GenCodesViewInp 获取信息
type GenCodesViewInp struct {
Id int64
}
type GenCodesViewModel struct {
entity.SysGenCodes
}
// GenCodesListInp 获取列表
type GenCodesListInp struct {
form.PageReq
form.StatusReq
GenType int `json:"genType"`
VarName string `json:"varName"`
}
type GenCodesListModel struct {
entity.SysGenCodes
}
// GenCodesStatusInp 更新状态
type GenCodesStatusInp struct {
Id int64 `json:"id" description:"生成ID"`
Status int `json:"status" description:"生成状态"`
}
type GenCodesStatusModel struct{}
// GenCodesSelectsInp 选项
type GenCodesSelectsInp struct {
}
type GenCodesSelectsModel struct {
GenType form.Selects `json:"genType" dc:"生成类型"`
Db form.Selects `json:"db" dc:"数据库选项"`
Status form.Selects `json:"status" dc:"生成状态"`
LinkMode form.Selects `json:"linkMode" dc:"关联表方式"`
BuildMeth form.Selects `json:"buildMeth" dc:"生成方式"`
// 字段表格选项
FormMode form.Selects `json:"formMode" dc:"表单组件"`
FormRole form.Selects `json:"formRole" dc:"表单验证"`
DictMode DictTreeSelectModel `json:"dictMode" dc:"字典类型"`
WhereMode form.Selects `json:"whereMode" dc:"查询条件"`
}
// GenCodesTableSelectInp 数据库表选项
type GenCodesTableSelectInp struct {
Name string `json:"name" dc:"数据库配置名称"`
}
type GenCodesTableSelectModel struct {
Value string `json:"value"`
Label string `json:"label"`
Name string `json:"name"`
DaoName string `json:"daoName" dc:"orm模型名称"`
DefVarName string `json:"defVarName" dc:"默认实体名称"`
DefAlias string `json:"defAlias" dc:"默认关联表别名"`
DefTableComment string `json:"defTableComment" dc:"默认菜单名称"`
}
// GenCodesColumnSelectInp 表字段选项
type GenCodesColumnSelectInp struct {
Name string `json:"name" dc:"数据库配置名称"`
Table string `json:"table" dc:"表名称"`
}
type GenCodesColumnSelectModel struct {
Value string `json:"value"`
Label string `json:"label"`
Name string `json:"name"`
}
// GenCodesColumnListInp 表字段列表
type GenCodesColumnListInp struct {
Name string `json:"name" dc:"数据库配置名称"`
Table string `json:"table" dc:"表名称"`
IsLink int64 `json:"isLink" dc:"是否是关联表"`
Alias string `json:"alias" dc:"关联表别名"`
}
type GenCodesColumnListModel struct {
model.GenCodesColumn
}
// GenCodesPreviewInp 生成预览
type GenCodesPreviewInp struct {
entity.SysGenCodes
}
// GenFile 生成文件配置
type GenFile struct {
Content string `json:"content" dc:"页面内容"`
Path string `json:"path" dc:"生成路径"`
Meth int `json:"meth" dc:"生成方式"`
Required bool `json:"required" dc:"是否是必要构建文件"`
}
type GenCodesPreviewModel struct {
Config *model.GenerateConfig `json:"config"`
Views map[string]*GenFile `json:"views" dc:"页面"`
}
// GenCodesBuildInp 提交生成
type GenCodesBuildInp struct {
entity.SysGenCodes
}