feat: add cart on front
This commit is contained in:
1 parent
d9745d972a
commit
733e3f6208
5 files changed
+31
-8
No files matched your search
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
type CartItem struct {
|
||||
ID uint `json:"id" gorm:"primaryKey"`
|
||||
UserID uint `json:"user_id" gorm:"not null;uniqueIndex;idx_user_item"`
|
||||
ItemID uint `json:"item_id" gorm:"not null;uniqueIndex;idx_user_item"`
|
||||
UserID uint `json:"user_id" gorm:"not null;uniqueIndex:idx_user_item"`
|
||||
ItemID uint `json:"item_id" gorm:"not null;uniqueIndex:idx_user_item"`
|
||||
Quantity float64 `json:"quantity" gorm:"not null;default:1"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
Reference in new issue
Block a user