| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | package queries | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ListProductsQuery 产品列表查询 | 
					
						
							|  |  |  | type ListProductsQuery struct { | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 	Page       int      `form:"page" binding:"omitempty,min=1" comment:"页码"` | 
					
						
							|  |  |  | 	PageSize   int      `form:"page_size" binding:"omitempty,min=1,max=100" comment:"每页数量"` | 
					
						
							|  |  |  | 	Keyword    string   `form:"keyword" binding:"omitempty,max=100" comment:"搜索关键词"` | 
					
						
							|  |  |  | 	CategoryID string   `form:"category_id" binding:"omitempty,uuid" comment:"分类ID"` | 
					
						
							|  |  |  | 	MinPrice   *float64 `form:"min_price" binding:"omitempty,min=0" comment:"最低价格"` | 
					
						
							|  |  |  | 	MaxPrice   *float64 `form:"max_price" binding:"omitempty,min=0" comment:"最高价格"` | 
					
						
							|  |  |  | 	IsEnabled  *bool    `form:"is_enabled" comment:"是否启用"` | 
					
						
							|  |  |  | 	IsVisible  *bool    `form:"is_visible" comment:"是否展示"` | 
					
						
							|  |  |  | 	IsPackage  *bool    `form:"is_package" comment:"是否组合包"` | 
					
						
							|  |  |  | 	SortBy     string   `form:"sort_by" binding:"omitempty,oneof=name code price created_at updated_at" comment:"排序字段"` | 
					
						
							|  |  |  | 	SortOrder  string   `form:"sort_order" binding:"omitempty,sort_order" comment:"排序方向"` | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // SearchProductsQuery 产品搜索查询 | 
					
						
							|  |  |  | type SearchProductsQuery struct { | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 	Page       int      `form:"page" binding:"omitempty,min=1" comment:"页码"` | 
					
						
							|  |  |  | 	PageSize   int      `form:"page_size" binding:"omitempty,min=1,max=100" comment:"每页数量"` | 
					
						
							|  |  |  | 	Keyword    string   `form:"keyword" binding:"omitempty,max=100" comment:"搜索关键词"` | 
					
						
							|  |  |  | 	CategoryID string   `form:"category_id" binding:"omitempty,uuid" comment:"分类ID"` | 
					
						
							|  |  |  | 	MinPrice   *float64 `form:"min_price" binding:"omitempty,min=0" comment:"最低价格"` | 
					
						
							|  |  |  | 	MaxPrice   *float64 `form:"max_price" binding:"omitempty,min=0" comment:"最高价格"` | 
					
						
							|  |  |  | 	IsEnabled  *bool    `form:"is_enabled" comment:"是否启用"` | 
					
						
							|  |  |  | 	IsVisible  *bool    `form:"is_visible" comment:"是否展示"` | 
					
						
							|  |  |  | 	IsPackage  *bool    `form:"is_package" comment:"是否组合包"` | 
					
						
							|  |  |  | 	SortBy     string   `form:"sort_by" binding:"omitempty,oneof=name code price created_at updated_at" comment:"排序字段"` | 
					
						
							|  |  |  | 	SortOrder  string   `form:"sort_order" binding:"omitempty,sort_order" comment:"排序方向"` | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // GetProductQuery 获取产品详情查询 | 
					
						
							|  |  |  | type GetProductQuery struct { | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 	ID   string `uri:"id" binding:"omitempty,uuid" comment:"产品ID"` | 
					
						
							|  |  |  | 	Code string `form:"code" binding:"omitempty,product_code" comment:"产品编号"` | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-31 15:41:00 +08:00
										 |  |  | // GetProductDetailQuery 获取产品详情查询(支持可选文档) | 
					
						
							|  |  |  | type GetProductDetailQuery struct { | 
					
						
							|  |  |  | 	ID            string `uri:"id" binding:"omitempty,uuid" comment:"产品ID"` | 
					
						
							|  |  |  | 	Code          string `form:"code" binding:"omitempty,product_code" comment:"产品编号"` | 
					
						
							|  |  |  | 	WithDocument  *bool  `form:"with_document" comment:"是否包含文档信息"` | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | // GetProductsByIDsQuery 根据ID列表获取产品查询 | 
					
						
							|  |  |  | type GetProductsByIDsQuery struct { | 
					
						
							| 
									
										
										
										
											2025-07-20 20:53:26 +08:00
										 |  |  | 	IDs []string `form:"ids" binding:"required,dive,uuid" comment:"产品ID列表"` | 
					
						
							| 
									
										
										
										
											2025-07-15 13:21:34 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // GetSubscribableProductsQuery 获取可订阅产品查询 | 
					
						
							|  |  |  | type GetSubscribableProductsQuery struct { | 
					
						
							|  |  |  | 	UserID string `form:"user_id" binding:"required" comment:"用户ID"` | 
					
						
							|  |  |  | }  |