fusenapi/model/gmodel/fs_menu_gen.go

22 lines
743 B
Go
Raw Normal View History

2023-06-19 01:53:35 +00:00
package gmodel
2023-06-16 11:04:13 +00:00
import (
"gorm.io/gorm"
)
// fs_menu 后台菜单
type FsMenu struct {
2023-06-19 10:27:31 +00:00
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
2023-08-23 07:08:45 +00:00
Name *string `gorm:"default:'';" json:"name"` //
Parent *int64 `gorm:"index;default:0;" json:"parent"` // 父id
2023-06-19 10:27:31 +00:00
Route *string `gorm:"default:'';" json:"route"` //
2023-08-23 07:08:45 +00:00
Order *int64 `gorm:"default:0;" json:"order"` // 排序
2023-06-19 10:27:31 +00:00
Data *[]byte `gorm:"default:'';" json:"data"` // 其他信息(图标等)
2023-06-16 11:04:13 +00:00
}
type FsMenuModel struct {
db *gorm.DB
name string
}
2023-06-16 11:04:13 +00:00
func NewFsMenuModel(db *gorm.DB) *FsMenuModel { return &FsMenuModel{db: db, name: "fs_menu"} }