change log api to reflect data split into base and extension

This commit is contained in:
2025-04-24 15:48:21 +02:00
parent c07aa09dcd
commit 2e01287a71
13 changed files with 182 additions and 42 deletions

View File

@@ -3,7 +3,7 @@ package cropprotection
import (
"wagfarm-api/assets/pesticide"
"wagfarm-api/database"
"wagfarm-api/logs/base"
"wagfarm-api/logs/generic"
"wagfarm-api/taxonomy/worker"
"github.com/shopspring/decimal"
@@ -11,7 +11,7 @@ import (
)
type CropProtectionLog struct {
base.FieldWorkLog
generic.FieldWorkLog
PesticideID uint `gorm:"not null"`
Pesticide pesticide.Pesticide `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;not null"`
Amount float64 `gorm:"not null"` // in units of the pesticide