catalog update
This commit is contained in:
parent
edd980f4c1
commit
5e3b9e5d23
@ -1,5 +1,30 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type GetProductRequest struct {
|
||||
ProductID int `json:"product_id"`
|
||||
}
|
||||
|
||||
type GetProductResponse struct {
|
||||
ID int `db:"id"`
|
||||
PID string `db:"pid"`
|
||||
Name string `db:"name"`
|
||||
Price float64 `db:"price"`
|
||||
CreatedAt time.Duration `db:"created_at"`
|
||||
UpdatedAt time.Duration `db:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
type GetProductListRequest struct {
|
||||
CategoryID int `json:"category_id"`
|
||||
}
|
||||
|
||||
type GetProductListResponse struct {
|
||||
Products []GetProductResponse
|
||||
}
|
||||
|
||||
type AddProductToBasketRequest struct {
|
||||
ProductID int `json:"product_id"`
|
||||
Quantity int `json:"quantity"`
|
||||
|
Loading…
Reference in New Issue
Block a user