api-entities/basket/dto/dto.go
2024-12-06 13:24:56 +01:00

36 lines
863 B
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.Duration `json:"created_at"`
UpdatedAt time.Duration `json:"updated_at,omitempty"`
}
type GetBasketItemsRequestDTO struct {
}
type GetBasketItemsResponseDTO struct {
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"`
UpdatedAt time.Duration `json:"updated_at,omitempty"`
}
type BasketCheckoutRequestDTO struct {
BasketID string `json:"basket_id"`
}
type BasketCheckoutResponseDTO struct {
ID string `json:"basket_id"`
}