Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 304ffcbc3e | |||
| 5e3b9e5d23 | |||
| edd980f4c1 | |||
| 2e64d106aa |
@@ -10,7 +10,7 @@ type GetBasketResponse struct {
|
|||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
CreatedAt time.Duration `json:"created_at"`
|
CreatedAt time.Duration `json:"created_at"`
|
||||||
UpdatedAt time.Duration `json:"updated_at"`
|
UpdatedAt time.Duration `json:"updated_at,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetBasketItemsRequest struct {
|
type GetBasketItemsRequest struct {
|
||||||
@@ -23,7 +23,7 @@ type GetBasketItemsResponse struct {
|
|||||||
Quantity int `json:"quantity"`
|
Quantity int `json:"quantity"`
|
||||||
Price float64 `json:"price"`
|
Price float64 `json:"price"`
|
||||||
CreatedAt time.Duration `json:"created_at"`
|
CreatedAt time.Duration `json:"created_at"`
|
||||||
UpdatedAt time.Duration `json:"updated_at"`
|
UpdatedAt time.Duration `json:"updated_at,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BasketCheckoutRequest struct {
|
type BasketCheckoutRequest struct {
|
||||||
@@ -31,5 +31,5 @@ type BasketCheckoutRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type BasketCheckoutResponse struct {
|
type BasketCheckoutResponse struct {
|
||||||
ID string `json:"order_id"`
|
ID string `json:"basket_id"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,30 @@
|
|||||||
package http
|
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
|
||||||
|
}
|
||||||
|
|
||||||
type AddProductToBasketRequest struct {
|
type AddProductToBasketRequest struct {
|
||||||
ProductID int `json:"product_id"`
|
ProductID int `json:"product_id"`
|
||||||
Quantity int `json:"quantity"`
|
Quantity int `json:"quantity"`
|
||||||
|
|||||||
Reference in New Issue
Block a user