Compare commits

..

5 Commits

Author SHA1 Message Date
77fd417f4e catalog update 2022-12-23 09:44:43 +01:00
7de07b9ef0 catalog update 2022-12-23 09:36:40 +01:00
304ffcbc3e catalog update 2022-12-23 09:33:13 +01:00
5e3b9e5d23 catalog update 2022-12-23 08:37:21 +01:00
edd980f4c1 basket update 2022-12-22 23:01:11 +01:00
2 changed files with 26 additions and 1 deletions

View File

@@ -31,5 +31,5 @@ type BasketCheckoutRequest struct {
}
type BasketCheckoutResponse struct {
ID string `json:"order_id"`
ID string `json:"basket_id"`
}

View File

@@ -1,5 +1,30 @@
package http
import (
"time"
)
type GetProductRequest struct {
ProductID int `json:"product_id"`
}
type GetProductResponse struct {
ID int `json:"id"`
PID string `json:"pid"`
Name string `json:"name"`
Price float64 `json:"price"`
CreatedAt time.Duration `json:"created_at"`
UpdatedAt time.Duration `json:"updated_at,omitempty"`
}
type GetProductListRequest struct {
CategoryID int `json:"category_id"`
}
type GetProductListResponse struct {
Products []GetProductResponse `json:"products"`
}
type AddProductToBasketRequest struct {
ProductID int `json:"product_id"`
Quantity int `json:"quantity"`