Compare commits

...

2 Commits

Author SHA1 Message Date
f6c6bb07fd go.mod update 2025-11-07 23:20:29 +01:00
606c6ec6f8 Basket update 2025-11-07 16:24:54 +01:00
4 changed files with 4 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ type GetBasketItemsRequestDTO struct {
type GetBasketItemsResponseDTO struct {
ID string `json:"id"`
BasketID string `json:"basket_id"`
ProductID int `json:"product_id"`
ProductID string `json:"product_id"`
Quantity int `json:"quantity"`
Price float64 `json:"price"`
CreatedAt time.Duration `json:"created_at"`

View File

@@ -14,7 +14,7 @@ type BasketEntity struct {
type BasketItemEntity struct {
ID string `db:"id" json:"id"`
BasketID string `db:"basket_id" json:"basket_id"`
ProductID int `db:"product_id" json:"product_id"`
ProductID string `db:"product_id" json:"product_id"`
Quantity int `db:"quantity" json:"quantity"`
Price float64 `db:"price" json:"price"`
CreatedAt pgtype.Timestamp `db:"created_at" json:"created_at"`

View File

@@ -12,7 +12,7 @@ type Basket struct {
type BasketItem struct {
BasketID string `db:"basket_id" json:"basket_id"`
ProductID int `db:"product_id" json:"product_id"`
ProductID string `db:"product_id" json:"product_id"`
Quantity int `db:"quantity" json:"quantity"`
Price float64 `db:"price" json:"price"`
CreatedAt time.Time `db:"created_at" json:"created_at"`

2
go.mod
View File

@@ -1,6 +1,6 @@
module git.ego.freeddns.org/egommerce/api-entities
go 1.19
go 1.24
require github.com/jackc/pgtype v1.14.3