From e2d3d636cb4c337f2e5788a0c6ff1c6985a11ebe Mon Sep 17 00:00:00 2001 From: qowevisa Date: Fri, 1 Nov 2024 09:30:34 +0200 Subject: [PATCH] Add TotalCost MetricValue MetricType and Type relationship to ItemBought --- db/item_bought.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/db/item_bought.go b/db/item_bought.go index 90777b7..d63d152 100644 --- a/db/item_bought.go +++ b/db/item_bought.go @@ -4,9 +4,14 @@ import "gorm.io/gorm" type ItemBought struct { gorm.Model - ItemID uint - Item *Item - Quantity uint - PaymentID uint - Payment *Payment + ItemID uint + Item *Item + PaymentID uint + Payment *Payment + TypeID uint + Type *Type + Quantity uint + TotalCost uint64 + MetricType uint8 + MetricValue uint64 }