Files
bl/modules/base/model/base_sys_menu.go
昔念 b6164f3b9e feat(logic): 实现地图刷怪功能并优化数据库查询
- 在玩家结构中添加 StopChan 通道,用于停止刷怪协程
- 优化 MapEnter 和 MapLeave 函数,支持刷怪功能
- 新增 spawnMonsters 函数实现具体刷怪逻辑
- 优化多个模块的数据库查询语句,提高查询效率
- 调整 PlayerService 中的 Reg 函数,优化数据插入操作
2025-08-23 17:44:12 +08:00

38 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import "blazing/cool"
const TableNameBaseSysMenu = "base_sys_menu"
// BaseSysMenu mapped from table <base_sys_menu>
type BaseSysMenu struct {
*cool.Model
ParentID uint `gorm:"column:parentId;type:bigint" json:"parentId"` // 父菜单ID
Name string `gorm:"column:name;type:varchar(255);not null" json:"name"` // 菜单名称
Router *string `gorm:"column:router;type:varchar(255)" json:"router"` // 菜单地址
Perms *string `gorm:"column:perms;type:text" json:"perms"` // 权限标识
Type int32 `gorm:"column:type;not null" json:"type"` // 类型 0目录 1菜单 2按钮
Icon *string `gorm:"column:icon;type:varchar(255)" json:"icon"` // 图标
OrderNum int32 `gorm:"column:orderNum;type:int;not null;default:0" json:"orderNum"` // 排序
ViewPath *string `gorm:"column:viewPath;type:varchar(255)" json:"viewPath"` // 视图地址
KeepAlive bool `gorm:"column:keepAlive;not null;default:1" json:"keepAlive"` // 路由缓存
IsShow bool `gorm:"column:isShow;not null;default:1" json:"isShow"` // 是否显示
}
// TableName BaseSysMenu's table name
func (*BaseSysMenu) TableName() string {
return TableNameBaseSysMenu
}
// NewBaseSysMenu create a new BaseSysMenu
func NewBaseSysMenu() *BaseSysMenu {
return &BaseSysMenu{
Model: cool.NewModel(),
}
}
// init 创建表
func init() {
cool.CreateTable(&BaseSysMenu{})
}