57 lines
1.3 KiB
Go
57 lines
1.3 KiB
Go
package basket
|
|
|
|
import "time"
|
|
|
|
type GetBasketRequestDTO struct {
|
|
BasketID string `json:"basket_id"`
|
|
}
|
|
|
|
type GetBasketResponseDTO struct {
|
|
ID string `json:"id"`
|
|
State string `json:"state"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
|
}
|
|
|
|
type GetBasketItemsRequestDTO struct {
|
|
BasketID string `json:"basket_id"`
|
|
}
|
|
|
|
type GetBasketItemsResponseDTO struct {
|
|
ID string `json:"id"`
|
|
BasketID string `json:"basket_id"`
|
|
ProductID string `json:"product_id"`
|
|
Quantity int `json:"quantity"`
|
|
Price float64 `json:"price"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
|
}
|
|
|
|
type AddProductToBasketRequestDTO struct {
|
|
BasketID string `json:"basket_id"`
|
|
ProductID string `json:"product_id"`
|
|
Quantity int `json:"quantity"`
|
|
}
|
|
|
|
type AddProductToBasketResponseDTO struct {
|
|
BasketID string `json:"basket_id"`
|
|
}
|
|
|
|
type RemoveFromBasketRequestDTO struct {
|
|
BasketID string `json:"basket_id"`
|
|
ProductID string `json:"product_id"`
|
|
Quantity int `json:"quantity"`
|
|
}
|
|
|
|
type RemoveFromBasketResponseDTO struct {
|
|
BasketID string `json:"basket_id"`
|
|
}
|
|
|
|
type BasketCheckoutRequestDTO struct {
|
|
BasketID string `json:"basket_id"`
|
|
}
|
|
|
|
type BasketCheckoutResponseDTO struct {
|
|
ID string `json:"basket_id"`
|
|
}
|