datamodel done without validators
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package seedtype
|
||||
|
||||
import (
|
||||
"wagfarm-api/database"
|
||||
"wagfarm-api/taxonomy/base"
|
||||
"wagfarm-api/taxonomy/crop"
|
||||
)
|
||||
@@ -10,3 +11,5 @@ type SeedType struct {
|
||||
CropID uint `gorm:"not null"`
|
||||
Crop crop.Crop `gorm:"not null; constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
|
||||
}
|
||||
|
||||
func RegisterModels() { database.RegisterModel(&SeedType{}) }
|
||||
|
||||
Reference in New Issue
Block a user