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.

18 lines
441 B

package models
type Sidebar struct {
ID int `json:"id"`
TagName string `json:"tagName"`
Sort string `json:"sort"`
DisplayCount int `json:"displayCount"`
Weight int `json:"weight"`
}
type Sidebars []*Sidebar
func (t Sidebars) Len() int { return len(t) }
func (t Sidebars) Swap(i, j int) { t[i], t[j] = t[j], t[i] }
func (t Sidebars) Less(i, j int) bool {
return t[i].Weight > t[j].Weight
}