go-wxhelper/model/entity/menu.go
2024-01-19 12:06:30 +08:00

24 lines
877 B
Go

package entity
import "wechat-robot/pkg/types"
// Menu
// @description: 菜单表
type Menu struct {
types.BaseDbModel
Type types.MenuType `json:"type" gorm:"type:enum('MENU','BUTTON'); default:'MENU'; not null; comment:'菜单类型(菜单或按钮)'"`
Name string `json:"name" gorm:"type:varchar(255);not null;comment:'菜单名称'"`
Path string `json:"path" gorm:"type:varchar(255);comment:'路径'"`
Icon string `json:"icon" gorm:"type:varchar(255);comment:'菜单图标'"`
Sort int `json:"sort" gorm:"type:int(3);not null;comment:'排序值(数字越小约靠前)'"`
ParentId *string `json:"parentId" gorm:"type:varchar(32);comment:'父级菜单ID(0表示顶级菜单)'"`
}
// TableName
// @description: 表名
// @receiver Menu
// @return string
func (Menu) TableName() string {
return "t_menu"
}