新增 web 后台菜单、新增角色表
This commit is contained in:
28
internal/model/do/menus.go
Normal file
28
internal/model/do/menus.go
Normal file
@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Menus is the golang structure of table menus for DAO operations like Where/Data.
|
||||
type Menus struct {
|
||||
g.Meta `orm:"table:menus, do:true"`
|
||||
Id interface{} // 菜单ID
|
||||
ParentId interface{} // 父级菜单ID
|
||||
Name interface{} // 菜单名称
|
||||
Path interface{} // 前端路由路径
|
||||
Component interface{} // 前端组件路径
|
||||
Type interface{} // 类型:1=目录(父级菜单),2=菜单(功能页面)
|
||||
Icon interface{} // 图标
|
||||
Sort interface{} // 排序
|
||||
Hidden interface{} // 是否隐藏:0=显示,1=隐藏
|
||||
Status interface{} // 状态:1=启用,2=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
21
internal/model/do/role_menus.go
Normal file
21
internal/model/do/role_menus.go
Normal file
@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// RoleMenus is the golang structure of table role_menus for DAO operations like Where/Data.
|
||||
type RoleMenus struct {
|
||||
g.Meta `orm:"table:role_menus, do:true"`
|
||||
Id interface{} // ID
|
||||
RoleId interface{} // 角色ID
|
||||
MenuId interface{} // 菜单ID
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
23
internal/model/do/roles.go
Normal file
23
internal/model/do/roles.go
Normal file
@ -0,0 +1,23 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Roles is the golang structure of table roles for DAO operations like Where/Data.
|
||||
type Roles struct {
|
||||
g.Meta `orm:"table:roles, do:true"`
|
||||
Id interface{} // 角色ID
|
||||
Name interface{} // 角色名称
|
||||
Code interface{} // 角色编码
|
||||
Description interface{} // 角色描述
|
||||
Status interface{} // 状态:1=启用,2=禁用
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
26
internal/model/entity/menus.go
Normal file
26
internal/model/entity/menus.go
Normal file
@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Menus is the golang structure for table menus.
|
||||
type Menus struct {
|
||||
Id int64 `json:"id" orm:"id" description:"菜单ID"` // 菜单ID
|
||||
ParentId int64 `json:"parentId" orm:"parent_id" description:"父级菜单ID"` // 父级菜单ID
|
||||
Name string `json:"name" orm:"name" description:"菜单名称"` // 菜单名称
|
||||
Path string `json:"path" orm:"path" description:"前端路由路径"` // 前端路由路径
|
||||
Component string `json:"component" orm:"component" description:"前端组件路径"` // 前端组件路径
|
||||
Type int `json:"type" orm:"type" description:"类型:1=目录(父级菜单),2=菜单(功能页面)"` // 类型:1=目录(父级菜单),2=菜单(功能页面)
|
||||
Icon string `json:"icon" orm:"icon" description:"图标"` // 图标
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"` // 排序
|
||||
Hidden int `json:"hidden" orm:"hidden" description:"是否隐藏:0=显示,1=隐藏"` // 是否隐藏:0=显示,1=隐藏
|
||||
Status int `json:"status" orm:"status" description:"状态:1=启用,2=禁用"` // 状态:1=启用,2=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
19
internal/model/entity/role_menus.go
Normal file
19
internal/model/entity/role_menus.go
Normal file
@ -0,0 +1,19 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// RoleMenus is the golang structure for table role_menus.
|
||||
type RoleMenus struct {
|
||||
Id int64 `json:"id" orm:"id" description:"ID"` // ID
|
||||
RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"` // 角色ID
|
||||
MenuId int64 `json:"menuId" orm:"menu_id" description:"菜单ID"` // 菜单ID
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
21
internal/model/entity/roles.go
Normal file
21
internal/model/entity/roles.go
Normal file
@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Roles is the golang structure for table roles.
|
||||
type Roles struct {
|
||||
Id int64 `json:"id" orm:"id" description:"角色ID"` // 角色ID
|
||||
Name string `json:"name" orm:"name" description:"角色名称"` // 角色名称
|
||||
Code string `json:"code" orm:"code" description:"角色编码"` // 角色编码
|
||||
Description string `json:"description" orm:"description" description:"角色描述"` // 角色描述
|
||||
Status int `json:"status" orm:"status" description:"状态:1=启用,2=禁用"` // 状态:1=启用,2=禁用
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
Reference in New Issue
Block a user