mirror of https://github.com/go-gorm/gorm.git
25 lines
331 B
Go
25 lines
331 B
Go
package callbacks
|
|
|
|
import "github.com/jinzhu/gorm"
|
|
|
|
func BeforeCreate(db *gorm.DB) {
|
|
// before save
|
|
// before create
|
|
|
|
// assign timestamp
|
|
}
|
|
|
|
func SaveBeforeAssociations(db *gorm.DB) {
|
|
}
|
|
|
|
func Create(db *gorm.DB) {
|
|
}
|
|
|
|
func SaveAfterAssociations(db *gorm.DB) {
|
|
}
|
|
|
|
func AfterCreate(db *gorm.DB) {
|
|
// after save
|
|
// after create
|
|
}
|