12345678910111213141516171819202122232425262728293031 |
- package classify_menu
- import "time"
- type ClassifyMenu struct {
- MenuID int `gorm:"primaryKey;column:menu_id;type:int(10) unsigned;not null" json:"menu_id"`
- MenuName string `gorm:"column:menu_name;type:varchar(255);not null;default:''" json:"menu_name"`
- ClassifyID int `gorm:"index:idx_classify_id;column:classify_id;type:int(10) unsigned;not null;default:0" json:"classify_id"`
- Sort int `gorm:"column:sort;type:int(10) unsigned;not null;default:0" json:"sort"`
- CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"create_time"`
- ModifyTime time.Time `gorm:"column:modify_time;type:datetime" json:"modify_time"`
- }
- func (m *ClassifyMenu) TableName() string {
- return "classify_menu"
- }
- type ClassifyMenuRelation struct {
- ID int `gorm:"primaryKey;column:id;type:int(10) unsigned;not null" json:"-"`
- ClassifyID int `gorm:"index:idx_classify_id;column:classify_id;type:int(10) unsigned;not null;default:0" json:"classifyId"`
- MenuID int `gorm:"index:idx_menu_id;column:menu_id;type:int(10) unsigned;not null;default:0" json:"menuId"`
- CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"createTime"`
- }
- func (m *ClassifyMenuRelation) TableName() string {
- return "classify_menu_relation"
- }
|