package entities import ( "gorm.io/gorm" "sorbet/pkg/db" "time" ) // SystemMenu 系统菜单表 type SystemMenu struct { ID uint `json:"id" xml:"id" gorm:"primaryKey;not null;comment:菜单编号"` PID *uint `json:"pid" xml:"pid" gorm:"comment:上级菜单编号"` Title string `json:"title" xml:"title" gorm:"size:25;not null;comment:菜单标题"` Icon string `json:"icon" xml:"icon" gorm:"comment:菜单图标"` Sort int32 `json:"sort" xml:"sort" gorm:"default:0;comment:排序"` Path string `json:"path" xml:"path" gorm:"comment:跳转链接"` Version db.Version `json:"-" xml:"-" gorm:"comment:乐观锁"` CreatedAt time.Time `json:"create_time" xml:"create_time" gorm:"<-:false;comment:创建时间"` UpdatedAt time.Time `json:"update_time" xml:"update_time" gorm:"<-:false;comment:更新时间"` DeletedAt gorm.DeletedAt `json:"delete_time" xml:"delete_time" gorm:"comment:删除时间"` Children []*SystemMenu `json:"children" xml:"children" gorm:"foreignKey:PID"` }