| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | package responses | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import "time" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-28 01:46:39 +08:00
										 |  |  | // PackageItemResponse 组合包项目响应 | 
					
						
							|  |  |  | type PackageItemResponse struct { | 
					
						
							|  |  |  | 	ID          string  `json:"id" comment:"项目ID"` | 
					
						
							|  |  |  | 	ProductID   string  `json:"product_id" comment:"子产品ID"` | 
					
						
							|  |  |  | 	ProductCode string  `json:"product_code" comment:"子产品编号"` | 
					
						
							|  |  |  | 	ProductName string  `json:"product_name" comment:"子产品名称"` | 
					
						
							|  |  |  | 	SortOrder   int     `json:"sort_order" comment:"排序"` | 
					
						
							|  |  |  | 	Price       float64 `json:"price" comment:"子产品价格"` | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | // ProductInfoResponse 产品详情响应 | 
					
						
							|  |  |  | type ProductInfoResponse struct { | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 	ID          string  `json:"id" comment:"产品ID"` | 
					
						
							|  |  |  | 	Name        string  `json:"name" comment:"产品名称"` | 
					
						
							|  |  |  | 	Code        string  `json:"code" comment:"产品编号"` | 
					
						
							|  |  |  | 	Description string  `json:"description" comment:"产品简介"` | 
					
						
							|  |  |  | 	Content     string  `json:"content" comment:"产品内容"` | 
					
						
							|  |  |  | 	CategoryID  string  `json:"category_id" comment:"产品分类ID"` | 
					
						
							|  |  |  | 	Price       float64 `json:"price" comment:"产品价格"` | 
					
						
							|  |  |  | 	IsEnabled   bool    `json:"is_enabled" comment:"是否启用"` | 
					
						
							|  |  |  | 	IsPackage   bool    `json:"is_package" comment:"是否组合包"` | 
					
						
							| 
									
										
										
										
											2025-07-29 00:30:32 +08:00
										 |  |  | 	IsSubscribed *bool  `json:"is_subscribed,omitempty" comment:"当前用户是否已订阅"` | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | 	// SEO信息 | 
					
						
							|  |  |  | 	SEOTitle       string `json:"seo_title" comment:"SEO标题"` | 
					
						
							|  |  |  | 	SEODescription string `json:"seo_description" comment:"SEO描述"` | 
					
						
							|  |  |  | 	SEOKeywords    string `json:"seo_keywords" comment:"SEO关键词"` | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | 	// 关联信息 | 
					
						
							|  |  |  | 	Category *CategoryInfoResponse `json:"category,omitempty" comment:"分类信息"` | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-28 01:46:39 +08:00
										 |  |  | 	// 组合包信息 | 
					
						
							|  |  |  | 	PackageItems []*PackageItemResponse `json:"package_items,omitempty" comment:"组合包项目列表"` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | 	CreatedAt time.Time `json:"created_at" comment:"创建时间"` | 
					
						
							|  |  |  | 	UpdatedAt time.Time `json:"updated_at" comment:"更新时间"` | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ProductListResponse 产品列表响应 | 
					
						
							|  |  |  | type ProductListResponse struct { | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 	Total int64                 `json:"total" comment:"总数"` | 
					
						
							|  |  |  | 	Page  int                   `json:"page" comment:"页码"` | 
					
						
							|  |  |  | 	Size  int                   `json:"size" comment:"每页数量"` | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | 	Items []ProductInfoResponse `json:"items" comment:"产品列表"` | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ProductSearchResponse 产品搜索响应 | 
					
						
							|  |  |  | type ProductSearchResponse struct { | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 	Total int64                 `json:"total" comment:"总数"` | 
					
						
							|  |  |  | 	Page  int                   `json:"page" comment:"页码"` | 
					
						
							|  |  |  | 	Size  int                   `json:"size" comment:"每页数量"` | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | 	Items []ProductInfoResponse `json:"items" comment:"产品列表"` | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ProductSimpleResponse 产品简单信息响应 | 
					
						
							|  |  |  | type ProductSimpleResponse struct { | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 	ID          string                  `json:"id" comment:"产品ID"` | 
					
						
							|  |  |  | 	Name        string                  `json:"name" comment:"产品名称"` | 
					
						
							|  |  |  | 	Code        string                  `json:"code" comment:"产品编号"` | 
					
						
							|  |  |  | 	Description string                  `json:"description" comment:"产品简介"` | 
					
						
							|  |  |  | 	Category    *CategorySimpleResponse `json:"category,omitempty" comment:"分类信息"` | 
					
						
							|  |  |  | 	Price       float64                 `json:"price" comment:"产品价格"` | 
					
						
							|  |  |  | 	IsPackage   bool                    `json:"is_package" comment:"是否组合包"` | 
					
						
							| 
									
										
										
										
											2025-07-29 00:30:32 +08:00
										 |  |  | 	IsSubscribed *bool                  `json:"is_subscribed,omitempty" comment:"当前用户是否已订阅"` | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ProductStatsResponse 产品统计响应 | 
					
						
							|  |  |  | type ProductStatsResponse struct { | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 	TotalProducts   int64 `json:"total_products" comment:"产品总数"` | 
					
						
							|  |  |  | 	EnabledProducts int64 `json:"enabled_products" comment:"启用产品数"` | 
					
						
							|  |  |  | 	VisibleProducts int64 `json:"visible_products" comment:"可见产品数"` | 
					
						
							|  |  |  | 	PackageProducts int64 `json:"package_products" comment:"组合包产品数"` | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-07-30 00:51:22 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // ProductAdminInfoResponse 管理员产品详情响应 | 
					
						
							|  |  |  | type ProductAdminInfoResponse struct { | 
					
						
							|  |  |  | 	ID          string  `json:"id" comment:"产品ID"` | 
					
						
							|  |  |  | 	Name        string  `json:"name" comment:"产品名称"` | 
					
						
							|  |  |  | 	Code        string  `json:"code" comment:"产品编号"` | 
					
						
							|  |  |  | 	Description string  `json:"description" comment:"产品简介"` | 
					
						
							|  |  |  | 	Content     string  `json:"content" comment:"产品内容"` | 
					
						
							|  |  |  | 	CategoryID  string  `json:"category_id" comment:"产品分类ID"` | 
					
						
							|  |  |  | 	Price       float64 `json:"price" comment:"产品价格"` | 
					
						
							|  |  |  | 	IsEnabled   bool    `json:"is_enabled" comment:"是否启用"` | 
					
						
							|  |  |  | 	IsVisible   bool    `json:"is_visible" comment:"是否可见"` | 
					
						
							|  |  |  | 	IsPackage   bool    `json:"is_package" comment:"是否组合包"` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// SEO信息 | 
					
						
							|  |  |  | 	SEOTitle       string `json:"seo_title" comment:"SEO标题"` | 
					
						
							|  |  |  | 	SEODescription string `json:"seo_description" comment:"SEO描述"` | 
					
						
							|  |  |  | 	SEOKeywords    string `json:"seo_keywords" comment:"SEO关键词"` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// 关联信息 | 
					
						
							|  |  |  | 	Category *CategoryInfoResponse `json:"category,omitempty" comment:"分类信息"` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// 组合包信息 | 
					
						
							|  |  |  | 	PackageItems []*PackageItemResponse `json:"package_items,omitempty" comment:"组合包项目列表"` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-31 15:41:00 +08:00
										 |  |  | 	// 文档信息 | 
					
						
							|  |  |  | 	Documentation *DocumentationResponse `json:"documentation,omitempty" comment:"产品文档"` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-30 00:51:22 +08:00
										 |  |  | 	CreatedAt time.Time `json:"created_at" comment:"创建时间"` | 
					
						
							|  |  |  | 	UpdatedAt time.Time `json:"updated_at" comment:"更新时间"` | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-31 15:41:00 +08:00
										 |  |  | // ProductInfoWithDocumentResponse 包含文档的产品详情响应 | 
					
						
							|  |  |  | type ProductInfoWithDocumentResponse struct { | 
					
						
							|  |  |  | 	ProductInfoResponse | 
					
						
							|  |  |  | 	Documentation *DocumentationResponse `json:"documentation,omitempty" comment:"产品文档"` | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-30 00:51:22 +08:00
										 |  |  | // ProductAdminListResponse 管理员产品列表响应 | 
					
						
							|  |  |  | type ProductAdminListResponse struct { | 
					
						
							|  |  |  | 	Total int64                      `json:"total" comment:"总数"` | 
					
						
							|  |  |  | 	Page  int                        `json:"page" comment:"页码"` | 
					
						
							|  |  |  | 	Size  int                        `json:"size" comment:"每页数量"` | 
					
						
							|  |  |  | 	Items []ProductAdminInfoResponse `json:"items" comment:"产品列表"` | 
					
						
							|  |  |  | } |