You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.0 KiB
27 lines
1.0 KiB
package model |
|
|
|
import ( |
|
"gofaster/internal/shared/model" |
|
) |
|
|
|
// Menu 菜单模型 |
|
type Menu struct { |
|
model.BaseModel |
|
Name string `json:"name"` // 菜单名称 |
|
Path string `json:"path"` // 前台路由路径 |
|
Component string `json:"component"` // Vue组件路径 |
|
Icon string `json:"icon"` // 图标 |
|
Sort int `json:"sort"` // 排序 |
|
ParentID *uint `json:"parent_id"` // 父菜单ID |
|
Level int `json:"level"` // 菜单层级 |
|
IsVisible bool `json:"is_visible"` // 是否可见 |
|
IsExternal bool `json:"is_external"` // 是否外部链接 |
|
Meta string `json:"meta"` // 元数据(JSON) |
|
Module string `json:"module"` // 所属模块 |
|
Status int `gorm:"default:1" json:"status"` // 状态:1-启用,0-禁用 |
|
} |
|
|
|
// TableName 指定表名 |
|
func (Menu) TableName() string { |
|
return "menus" |
|
}
|
|
|