Files
wagfarm/wagfarm-api/assets/pesticide/model.go

16 lines
404 B
Go

package pesticide
import (
"wagfarm-api/assets/base"
"wagfarm-api/database"
"wagfarm-api/taxonomy/pesticidetype"
)
type Pesticide struct {
base.BoughtResource
PesticideTypeID uint `gorm:"not null"`
PesticideType pesticidetype.PesticideType `gorm:"not null; constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}
func RegisterModels() { database.RegisterModel(&Pesticide{}) }