change log api to reflect data split into base and extension
This commit is contained in:
@@ -3,14 +3,14 @@ package harvest
|
||||
import (
|
||||
"wagfarm-api/assets/product"
|
||||
"wagfarm-api/database"
|
||||
"wagfarm-api/logs/base"
|
||||
"wagfarm-api/logs/generic"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type HarvestLog struct {
|
||||
base.FieldWorkLog
|
||||
generic.FieldWorkLog
|
||||
ProductID uint `gorm:"not null"`
|
||||
Product product.Product `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;not null"`
|
||||
Amount float64 `gorm:"not null"` // in units of the product
|
||||
|
||||
Reference in New Issue
Block a user