website-nav/model/navigation.go
2024-10-18 17:19:19 +08:00

30 lines
990 B
Go

package model
// NavigationType
// @description: 分类
type NavigationType struct {
Base
Name string `gorm:"column:name;type:varchar(255);not null;comment:'名称'"`
Icon string `gorm:"column:icon;type:varchar(255);not null;comment:'图标'"`
}
func (NavigationType) TableName() string {
return "t_navigation_type"
}
// Navigation
// @description: 导航
type Navigation struct {
Base
TypeID string `gorm:"column:type_id;type:varchar(255);not null;comment:'分类ID'"`
Title string `gorm:"column:title;type:varchar(255);not null;comment:'标题'"`
Url string `gorm:"column:url;type:varchar(255);not null;comment:'链接'"`
Description string `gorm:"column:description;type:varchar(255);not null;comment:'描述'"`
Icon string `gorm:"column:icon;type:varchar(255);not null;comment:'图标'"`
Enabled bool `gorm:"column:enabled;type:tinyint(1);not null;comment:'是否启用'"`
}
func (Navigation) TableName() string {
return "t_navigation"
}