示例#1
0
文件: bond_test.go 项目: c2h5oh/bond
func (u User) AfterCreate(sess bond.Session) error {
	message := fmt.Sprintf("User %q was created.", u.Username)
	return sess.Save(&Log{Message: message})
}
示例#2
0
文件: bond_test.go 项目: c2h5oh/bond
func (a Account) AfterCreate(sess bond.Session) error {
	message := fmt.Sprintf("Account %q was created.", a.Name)
	return sess.Save(&Log{Message: message})
}