final project structure
This commit is contained in:
12
wagfarm-api/log/cropprotection/model.go
Normal file
12
wagfarm-api/log/cropprotection/model.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package cropprotection
|
||||
|
||||
import "wagfarm-api/log/base"
|
||||
|
||||
type CropProtectionLog struct {
|
||||
base.FieldWorkLog
|
||||
PesticideID uint `gorm:"not null"`
|
||||
Pesticide taxonomy.Pesticide `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;not null"`
|
||||
Amount float64 `gorm:"not null"` // in units of the pesticide
|
||||
PerformedByID uint `gorm:"not null"`
|
||||
PerformedBy taxonomy.Worker `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;not null"`
|
||||
}
|
||||
Reference in New Issue
Block a user