Files
Go-Web-Template/server/model/system/request/sys_menu.go
2026-04-10 17:57:48 +08:00

34 lines
930 B
Go

package request
import (
"git.echol.cn/loser/Go-Web-Template/server/global"
"git.echol.cn/loser/Go-Web-Template/server/model/system"
)
// AddMenuAuthorityInfo Add menu authority info structure
type AddMenuAuthorityInfo struct {
Menus []system.SysBaseMenu `json:"menus"`
AuthorityId uint `json:"authorityId"` // 角色ID
}
// SetMenuAuthorities 通过菜单ID全量覆盖关联角色列表
type SetMenuAuthorities struct {
MenuId uint `json:"menuId" form:"menuId"` // 菜单ID
AuthorityIds []uint `json:"authorityIds" form:"authorityIds"` // 角色ID列表
}
func DefaultMenu() []system.SysBaseMenu {
return []system.SysBaseMenu{{
GVA_MODEL: global.GVA_MODEL{ID: 1},
ParentId: 0,
Path: "dashboard",
Name: "dashboard",
Component: "features/dashboard/DashboardPage",
Sort: 1,
Meta: system.Meta{
Title: "仪表盘",
Icon: "setting",
},
}}
}