Refactoring

This commit is contained in:
Piotr Biernat
2024-12-06 16:44:42 +01:00
parent 2cf4d4c25d
commit 5a5f643be8
18 changed files with 62 additions and 66 deletions

35
basket/dto/basket.go Normal file
View File

@@ -0,0 +1,35 @@
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"`
}