This commit is contained in:
2026-04-21 22:36:48 +08:00
commit 488c695fdf
748 changed files with 266838 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package queries
// ListCategoriesQuery 分类列表查询
type ListCategoriesQuery struct {
Page int `json:"page"`
PageSize int `json:"page_size"`
IsEnabled *bool `json:"is_enabled"`
IsVisible *bool `json:"is_visible"`
SortBy string `json:"sort_by"`
SortOrder string `json:"sort_order"`
}
// GetCategoryQuery 获取分类详情查询
type GetCategoryQuery struct {
ID string `json:"id"`
Code string `json:"code"`
}
// GetCategoryTreeQuery 获取分类树查询
type GetCategoryTreeQuery struct {
IncludeDisabled bool `json:"include_disabled"`
IncludeHidden bool `json:"include_hidden"`
}

View File

@@ -0,0 +1,44 @@
package queries
// ListProductsQuery 产品列表查询
type ListProductsQuery struct {
Page int `json:"page"`
PageSize int `json:"page_size"`
Keyword string `json:"keyword"`
CategoryID string `json:"category_id"`
MinPrice *float64 `json:"min_price"`
MaxPrice *float64 `json:"max_price"`
IsEnabled *bool `json:"is_enabled"`
IsVisible *bool `json:"is_visible"`
IsPackage *bool `json:"is_package"`
UserID string `json:"user_id"` // 用户ID用于查询订阅状态
IsSubscribed *bool `json:"is_subscribed"` // 是否已订阅筛选
SortBy string `json:"sort_by"`
SortOrder string `json:"sort_order"`
}
// SearchProductsQuery 产品搜索查询
type SearchProductsQuery struct {
Page int `json:"page"`
PageSize int `json:"page_size"`
Keyword string `json:"keyword"`
CategoryID string `json:"category_id"`
MinPrice *float64 `json:"min_price"`
MaxPrice *float64 `json:"max_price"`
IsEnabled *bool `json:"is_enabled"`
IsVisible *bool `json:"is_visible"`
IsPackage *bool `json:"is_package"`
SortBy string `json:"sort_by"`
SortOrder string `json:"sort_order"`
}
// GetProductQuery 获取产品详情查询
type GetProductQuery struct {
ID string `json:"id"`
Code string `json:"code"`
}
// GetProductsByIDsQuery 根据ID列表获取产品查询
type GetProductsByIDsQuery struct {
IDs []string `json:"ids"`
}

View File

@@ -0,0 +1,32 @@
package queries
// ListSubscriptionsQuery 订阅列表查询
type ListSubscriptionsQuery struct {
Page int `json:"page"`
PageSize int `json:"page_size"`
UserID string `json:"user_id"`
Keyword string `json:"keyword"`
SortBy string `json:"sort_by"`
SortOrder string `json:"sort_order"`
// 新增筛选字段
CompanyName string `json:"company_name"` // 企业名称
ProductName string `json:"product_name"` // 产品名称
StartTime string `json:"start_time"` // 订阅开始时间
EndTime string `json:"end_time"` // 订阅结束时间
}
// GetSubscriptionQuery 获取订阅详情查询
type GetSubscriptionQuery struct {
ID string `json:"id"`
}
// GetUserSubscriptionsQuery 获取用户订阅查询
type GetUserSubscriptionsQuery struct {
UserID string `json:"user_id"`
}
// GetProductSubscriptionsQuery 获取产品订阅查询
type GetProductSubscriptionsQuery struct {
ProductID string `json:"product_id"`
}