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.
21 lines
701 B
21 lines
701 B
6 days ago
|
package model
|
||
|
|
||
|
import (
|
||
|
"gofaster/internal/shared/model"
|
||
|
)
|
||
|
|
||
|
// MenuRoute 菜单路由关联表(多对多关系)
|
||
|
type MenuRoute struct {
|
||
|
model.BaseModel
|
||
|
MenuID uint `gorm:"primaryKey;index" json:"menu_id"` // 菜单ID
|
||
|
RouteMappingID uint `gorm:"primaryKey;index" json:"route_mapping_id"` // 路由映射ID
|
||
|
Sort int `gorm:"default:0" json:"sort"` // 排序
|
||
|
IsDefault bool `gorm:"default:false" json:"is_default"` // 是否为默认路由
|
||
|
Status int `gorm:"default:1" json:"status"` // 状态:1-启用,0-禁用
|
||
|
}
|
||
|
|
||
|
// TableName 指定表名
|
||
|
func (MenuRoute) TableName() string {
|
||
|
return "menu_routes"
|
||
|
}
|