From 5f358b9860dc78cca896c9e991d6b5710c9bdfbc Mon Sep 17 00:00:00 2001
From: blint <rethelyibalint@gmail.com>
Date: Sun, 20 Aug 2023 20:52:20 +0200
Subject: [PATCH] Add ProductInPult and BoughtInPult structs in api module

The new structures ProductInPult and BoughtInPult in api/model.go file have been added. These implementations are designed to facilitate the handling of product and purchasing data. Adding these types will help to establish a structure for the data flowing in and out of the API endpoints, and thereby improve the general utility and manageability of our system.
---
 api/model.go | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 api/model.go

diff --git a/api/model.go b/api/model.go
new file mode 100644
index 0000000..434ebc8
--- /dev/null
+++ b/api/model.go
@@ -0,0 +1,18 @@
+package api
+
+import (
+	"git.sch.bme.hu/disappointment-industries/becskasszasch/db"
+	"time"
+)
+
+type ProductInPult struct {
+	Product *db.Product `json:"product"`
+	Amount  int64       `json:"amount"`
+}
+
+type BoughtInPult struct {
+	User           *db.User         `json:"user"`
+	ProductsInPult []*ProductInPult `json:"productsInPult"`
+	Date           time.Time        `json:"date"`
+	Pultosch       *db.User         `json:"pultosch"`
+}
-- 
GitLab