35 lines
992 B
Go
35 lines
992 B
Go
package response
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type ProductColorResponse struct {
|
|
Name string `json:"name"`
|
|
ImagePath *string `json:"image_path"`
|
|
ImageUrl *string `json:"image_url"`
|
|
}
|
|
|
|
type ProductSpecificationResponse struct {
|
|
Title string `json:"title"`
|
|
ImagePaths []string `json:"image_paths"`
|
|
ImageUrls []string `json:"image_urls"`
|
|
}
|
|
|
|
type ProductsResponse struct {
|
|
ID uint `json:"id"`
|
|
Title string `json:"title"`
|
|
Variant *string `json:"variant"`
|
|
Price *string `json:"price"`
|
|
ThumbnailPath *string `json:"thumbnail_path"`
|
|
ThumbnailUrl *string `json:"thumbnail_url"`
|
|
Colors []ProductColorResponse `json:"colors"`
|
|
Specifications []ProductSpecificationResponse `json:"specifications"`
|
|
Status *string `json:"status"`
|
|
StatusId *int `json:"status_id"`
|
|
IsActive *bool `json:"is_active"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|