Restructurization
This commit is contained in:
35
basket/dto/dto.go
Normal file
35
basket/dto/dto.go
Normal 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user