Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Group ¶
type Group struct { Id int64 `gorm:"primary_key;column:id" json:"id"` Name string `gorm:"column:name" json:"name"` Public null.NullBool `gorm:"default:true;column:public" json:"public"` Order int `gorm:"default:0;column:order_id" json:"order_id"` CreatedAt time.Time `gorm:"column:created_at" json:"created_at"` UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"` }
Group is the main struct for Groups
func SelectGroups ¶
SelectGroups returns all groups
func (*Group) AfterCreate ¶ added in v0.90.53
func (g *Group) AfterCreate()
func (*Group) AfterDelete ¶ added in v0.90.53
func (g *Group) AfterDelete()
func (*Group) AfterUpdate ¶ added in v0.90.53
func (g *Group) AfterUpdate()
type GroupOrder ¶
type GroupOrder []*Group
GroupOrder will reorder the groups based on 'order_id' (Order)
func (GroupOrder) Len ¶
func (c GroupOrder) Len() int
Sort interface for resorting the Groups in order
func (GroupOrder) Less ¶
func (c GroupOrder) Less(i, j int) bool
func (GroupOrder) Swap ¶
func (c GroupOrder) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.