32 lines
766 B
Go
32 lines
766 B
Go
package catalog
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type GetProductRequestDTO struct {
|
|
ProductID string `json:"product_id"`
|
|
}
|
|
|
|
type GetProductResponseDTO struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Slug string `json:"slug"`
|
|
Price float64 `json:"price"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
|
}
|
|
|
|
type GetProductListResponseDTO struct {
|
|
Products []GetProductResponseDTO `json:"products"`
|
|
}
|
|
|
|
type GetProductDetailsResponseDTO struct {
|
|
ID string `json:"id"`
|
|
SLug string `json:"slug"`
|
|
Name string `json:"name"`
|
|
Price string `json:"price"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
|
}
|