more
All checks were successful
Build and Publish / Metadata (push) Successful in 8s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 1m12s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m9s

This commit is contained in:
matst80
2025-10-14 12:30:12 +02:00
parent 7a79efbb9f
commit 0b9c14c231
9 changed files with 201 additions and 25 deletions

View File

@@ -59,12 +59,20 @@ type CartDelivery struct {
PickupPoint *messages.PickupPoint `json:"pickupPoint,omitempty"`
}
type CartNotification struct {
LinkedId int `json:"id"`
Provider string `json:"provider"`
Title string `json:"title"`
Content string `json:"content"`
}
type CartGrain struct {
mu sync.RWMutex
lastItemId int
lastDeliveryId int
lastAccess time.Time
lastChange time.Time // unix seconds of last successful mutation (replay sets from event ts)
lastChange time.Time // unix seconds of last successful mutation (replay sets from event ts)
userId string
Id CartId `json:"id"`
Items []*CartItem `json:"items"`
TotalPrice int64 `json:"totalPrice"`
@@ -77,6 +85,7 @@ type CartGrain struct {
OrderReference string `json:"orderReference,omitempty"`
PaymentStatus string `json:"paymentStatus,omitempty"`
Vouchers []*voucher.Voucher `json:"vouchers,omitempty"`
Notifications []CartNotification `json:"cartNotification,omitempty"`
}
func (c *CartGrain) GetId() uint64 {