diff --git a/basket/dto/basket.go b/basket/dto/basket.go index b89314d..2f7575e 100644 --- a/basket/dto/basket.go +++ b/basket/dto/basket.go @@ -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"` diff --git a/basket/entity/basket.go b/basket/entity/basket.go index c37f36b..22a2b5b 100644 --- a/basket/entity/basket.go +++ b/basket/entity/basket.go @@ -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"` diff --git a/basket/model/basket.go b/basket/model/basket.go index c317217..998cc77 100644 --- a/basket/model/basket.go +++ b/basket/model/basket.go @@ -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"`