MCPcopy
hub / github.com/go-gorm/gorm / Product3

Struct Product3

tests/hooks_test.go:300–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300type Product3 struct {
301 gorm.Model
302 Name string
303 Code string
304 Price int64
305 Owner string
306}
307
308func (s Product3) BeforeCreate(tx *gorm.DB) (err error) {
309 tx.Statement.SetColumn("Price", s.Price+100)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected