wip cart handling

This commit is contained in:
2025-03-04 13:00:30 +01:00
parent 23392cc5c1
commit 0c85ca5938
7 changed files with 206 additions and 253 deletions

View File

@@ -7,6 +7,7 @@ import (
type CartItem struct {
gorm.Model
SessionId string `json:"sessionid" binding:"required" gorm:"not null"`
ShopItem ShopItem `json:"shopitem" gorm:"foreignKey:ID"` //gorm one2one
ShopItemId uint
ShopItem ShopItem `json:"shopitem" gorm:"foreignKey:ShopItemId"` //gorm one2one
Quantity int `json:"quantity" binding:"required"`
}