api-entities/basket/dto/basket.go

36 lines
863 B
Go
Raw Permalink Normal View History

2024-12-06 13:24:56 +01:00
package basket
2022-12-18 20:51:26 +01:00
2022-12-22 13:31:25 +01:00
import "time"
2024-12-06 13:24:56 +01:00
type GetBasketRequestDTO struct {
2022-12-22 13:31:25 +01:00
BasketID string `json:"basket_id"`
}
2024-12-06 13:24:56 +01:00
type GetBasketResponseDTO struct {
2022-12-22 13:31:25 +01:00
ID string `json:"id"`
State string `json:"state"`
CreatedAt time.Duration `json:"created_at"`
2022-12-22 20:59:47 +01:00
UpdatedAt time.Duration `json:"updated_at,omitempty"`
2022-12-22 13:31:25 +01:00
}
2024-12-06 13:24:56 +01:00
type GetBasketItemsRequestDTO struct {
2022-12-22 13:31:25 +01:00
}
2024-12-06 13:24:56 +01:00
type GetBasketItemsResponseDTO struct {
2022-12-22 13:31:25 +01:00
ID string `json:"id"`
BasketID string `json:"basket_id"`
ProductID int `json:"product_id"`
Quantity int `json:"quantity"`
Price float64 `json:"price"`
CreatedAt time.Duration `json:"created_at"`
2022-12-22 20:59:47 +01:00
UpdatedAt time.Duration `json:"updated_at,omitempty"`
2022-12-22 13:31:25 +01:00
}
2024-12-06 13:24:56 +01:00
type BasketCheckoutRequestDTO struct {
2022-12-18 20:51:26 +01:00
BasketID string `json:"basket_id"`
}
2024-12-06 13:24:56 +01:00
type BasketCheckoutResponseDTO struct {
2022-12-22 23:01:11 +01:00
ID string `json:"basket_id"`
2022-12-18 20:51:26 +01:00
}