更新
This commit is contained in:
1 parent
012f8edf8b
commit
36ff960fbd
33 files changed
+1644
-344
No files matched your search
@@ -77,6 +77,9 @@ func Init(_ string) {
|
||||
new(SystemDomainPool),
|
||||
new(SystemTenantDomain),
|
||||
new(SystemModules),
|
||||
// 游客轻身份与通用数据(docs/sql/create_guest_tables.sql):免登录模块的临时存储
|
||||
new(GuestUser),
|
||||
new(GuestData),
|
||||
new(StorageConfig),
|
||||
new(TenantSiteSetting),
|
||||
new(PlatformSiteSetting),
|
||||
|
||||
+21
-19
@@ -14,28 +14,30 @@ const (
|
||||
|
||||
// SystemMenu 系统菜单表 yz_system_menu
|
||||
type SystemMenu struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"` // 菜单ID
|
||||
Pid int64 `orm:"column(pid);default(0)" json:"pid"` // 上级菜单ID
|
||||
Title string `orm:"column(title);size(50)" json:"title"` // 菜单名称
|
||||
Path *string `orm:"column(path);size(200);null" json:"path"` // 路由路径
|
||||
ComponentPath *string `orm:"column(component_path);size(255);null" json:"componentPath"` // 组件路径
|
||||
Icon *string `orm:"column(icon);size(100);null" json:"icon"` // 菜单图标
|
||||
Sort int64 `orm:"column(sort);default(0)" json:"sort"` // 排序号
|
||||
Status int8 `orm:"column(status);default(0)" json:"status"` // 状态:1-启用,0-禁用
|
||||
IsVisible *int8 `orm:"column(is_visible);null" json:"isVisible"` // 是否显示:1-显示 0-不显示
|
||||
Views *string `orm:"column(views);size(255);null" json:"views"` // 菜单显示端(JSON数组字符串):[1]=平台端 [2]=租户端 [1,2]=双端
|
||||
Platforms *string `orm:"column(platforms);size(64);null" json:"platforms"` // 展示端(JSON数组字符串):["web"] ["app"] ["web","app"];空/NULL=全端
|
||||
Type int8 `orm:"column(type)" json:"type"` // 菜单类型:1-目录,2-页面,3-接口
|
||||
Permission *string `orm:"column(permission);size(100);null" json:"permission"` // 权限标识(按钮类型时填写)
|
||||
Creater *string `orm:"column(creater);size(50);null" json:"creater"` // 创建者
|
||||
Remark *string `orm:"column(remark);size(500);null" json:"remark"` // 备注
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"createTime"` // 创建时间
|
||||
UpdateTime *time.Time `orm:"column(update_time);auto_now;type(datetime);null" json:"updateTime"` // 更新时间
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"deleteTime"` // 删除时间
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"` // 菜单ID
|
||||
Pid int64 `orm:"column(pid);default(0)" json:"pid"` // 上级菜单ID
|
||||
Title string `orm:"column(title);size(50)" json:"title"` // 菜单名称
|
||||
Path *string `orm:"column(path);size(200);null" json:"path"` // 路由路径
|
||||
ComponentPath *string `orm:"column(component_path);size(255);null" json:"componentPath"` // 组件路径
|
||||
Icon *string `orm:"column(icon);size(100);null" json:"icon"` // 菜单图标
|
||||
Sort int64 `orm:"column(sort);default(0)" json:"sort"` // 排序号
|
||||
Status int8 `orm:"column(status);default(0)" json:"status"` // 状态:1-启用,0-禁用
|
||||
IsVisible *int8 `orm:"column(is_visible);null" json:"isVisible"` // 是否显示:1-显示 0-不显示
|
||||
// 是否必须登录才能使用:1=必须登录(默认) 0=可免登录(游客持游客令牌可用)。
|
||||
// 移动端免登录控制从模块级下沉到菜单级:公开菜单接口 /api/menus/public 只下发 0 的菜单。
|
||||
RequireLogin int8 `orm:"column(require_login);default(1)" json:"require_login"`
|
||||
Views *string `orm:"column(views);size(255);null" json:"views"` // 菜单显示端(JSON数组字符串):[1]=平台端 [2]=租户端 [1,2]=双端
|
||||
Platforms *string `orm:"column(platforms);size(64);null" json:"platforms"` // 展示端(JSON数组字符串):["web"] ["app"] ["web","app"];空/NULL=全端
|
||||
Type int8 `orm:"column(type)" json:"type"` // 菜单类型:1-目录,2-页面,3-接口
|
||||
Permission *string `orm:"column(permission);size(100);null" json:"permission"` // 权限标识(按钮类型时填写)
|
||||
Creater *string `orm:"column(creater);size(50);null" json:"creater"` // 创建者
|
||||
Remark *string `orm:"column(remark);size(500);null" json:"remark"` // 备注
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"createTime"` // 创建时间
|
||||
UpdateTime *time.Time `orm:"column(update_time);auto_now;type(datetime);null" json:"updateTime"` // 更新时间
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"deleteTime"` // 删除时间
|
||||
}
|
||||
|
||||
// TableName 自定义表名
|
||||
func (m *SystemMenu) TableName() string {
|
||||
return "yz_system_menu"
|
||||
}
|
||||
|
||||
+31
-28
@@ -1,28 +1,31 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// SystemModules 系统模块表 yz_system_modules
|
||||
type SystemModules struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Mid *uint64 `orm:"column(mid);null" json:"mid"`
|
||||
Name string `orm:"column(name);size(50)" json:"name"`
|
||||
Code string `orm:"column(code);size(50)" json:"code"`
|
||||
Path string `orm:"column(path);size(100)" json:"path"`
|
||||
Icon string `orm:"column(icon);size(50)" json:"icon"`
|
||||
Description string `orm:"column(description);size(255)" json:"description"`
|
||||
Type int `orm:"column(type);default(0)" json:"type"` // 0未分类 1功能模块 2系统配置
|
||||
Sort int `orm:"column(sort);default(0)" json:"sort"`
|
||||
Status int8 `orm:"column(status);default(1)" json:"status"` // 0禁用 1启用
|
||||
IsShow int8 `orm:"column(is_show);default(1)" json:"is_show"` // 0否 1是
|
||||
// 展示端(JSON 数组字符串):["web"] ["app"] ["web","app"];空/NULL=全端显示。
|
||||
// 取值见 PlatformWeb / PlatformApp。菜单未单独配置时继承所属模块的展示端。
|
||||
Platforms *string `orm:"column(platforms);size(64);null" json:"platforms"`
|
||||
CreateTime *time.Time `orm:"column(create_time);type(datetime);null" json:"create_time"`
|
||||
UpdateTime *time.Time `orm:"column(update_time);type(datetime);null" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *SystemModules) TableName() string {
|
||||
return "yz_system_modules"
|
||||
}
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// SystemModules 系统模块表 yz_system_modules
|
||||
type SystemModules struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Mid *uint64 `orm:"column(mid);null" json:"mid"`
|
||||
Name string `orm:"column(name);size(50)" json:"name"`
|
||||
Code string `orm:"column(code);size(50)" json:"code"`
|
||||
Path string `orm:"column(path);size(100)" json:"path"`
|
||||
Icon string `orm:"column(icon);size(50)" json:"icon"`
|
||||
Description string `orm:"column(description);size(255)" json:"description"`
|
||||
Type int `orm:"column(type);default(0)" json:"type"` // 0未分类 1功能模块 2系统配置
|
||||
Sort int `orm:"column(sort);default(0)" json:"sort"`
|
||||
Status int8 `orm:"column(status);default(1)" json:"status"` // 0禁用 1启用
|
||||
IsShow int8 `orm:"column(is_show);default(1)" json:"is_show"` // 0否 1是
|
||||
// 是否必须登录才能进入该模块:1=必须登录(默认,保持既有行为) 0=可免登录使用。
|
||||
// 移动端 nav 未登录时据此决定宫格卡片点击是「进登录引导」还是「直接进入」。
|
||||
RequireLogin int8 `orm:"column(require_login);default(1)" json:"require_login"`
|
||||
// 展示端(JSON 数组字符串):["web"] ["app"] ["web","app"];空/NULL=全端显示。
|
||||
// 取值见 PlatformWeb / PlatformApp。菜单未单独配置时继承所属模块的展示端。
|
||||
Platforms *string `orm:"column(platforms);size(64);null" json:"platforms"`
|
||||
CreateTime *time.Time `orm:"column(create_time);type(datetime);null" json:"create_time"`
|
||||
UpdateTime *time.Time `orm:"column(update_time);type(datetime);null" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *SystemModules) TableName() string {
|
||||
return "yz_system_modules"
|
||||
}
|
||||
Reference in new issue
Block a user