add hook
parent
402d7e93b1
commit
f10719c212
|
@ -40,3 +40,9 @@ var BeforeGroupUpdate func(*Group) error = func(g *Group) error { return nil }
|
||||||
func (grp *Group) BeforeUpdate(tx *gorm.DB) (err error) {
|
func (grp *Group) BeforeUpdate(tx *gorm.DB) (err error) {
|
||||||
return BeforeGroupUpdate(grp)
|
return BeforeGroupUpdate(grp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var BeforeGroupDelete func(*Group) error = func(g *Group) error { return nil }
|
||||||
|
|
||||||
|
func (grp *Group) BeforeDelete(tx *gorm.DB) (err error) {
|
||||||
|
return BeforeGroupDelete(grp)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue