37 lines
1.6 KiB
Go
37 lines
1.6 KiB
Go
package queries
|
|
|
|
import "tyapi-server/internal/domains/product/entities"
|
|
|
|
// ListSubscriptionsQuery 订阅列表查询
|
|
type ListSubscriptionsQuery struct {
|
|
Page int `form:"page" binding:"min=1" comment:"页码"`
|
|
PageSize int `form:"page_size" binding:"min=1,max=100" comment:"每页数量"`
|
|
UserID string `form:"user_id" comment:"用户ID"`
|
|
ProductID string `form:"product_id" comment:"产品ID"`
|
|
Status entities.SubscriptionStatus `form:"status" comment:"订阅状态"`
|
|
SortBy string `form:"sort_by" comment:"排序字段"`
|
|
SortOrder string `form:"sort_order" comment:"排序方向"`
|
|
}
|
|
|
|
// GetSubscriptionQuery 获取订阅详情查询
|
|
type GetSubscriptionQuery struct {
|
|
ID string `uri:"id" binding:"required" comment:"订阅ID"`
|
|
}
|
|
|
|
// GetUserSubscriptionsQuery 获取用户订阅查询
|
|
type GetUserSubscriptionsQuery struct {
|
|
UserID string `form:"user_id" binding:"required" comment:"用户ID"`
|
|
Status *entities.SubscriptionStatus `form:"status" comment:"订阅状态"`
|
|
}
|
|
|
|
// GetProductSubscriptionsQuery 获取产品订阅查询
|
|
type GetProductSubscriptionsQuery struct {
|
|
ProductID string `form:"product_id" binding:"required" comment:"产品ID"`
|
|
Status *entities.SubscriptionStatus `form:"status" comment:"订阅状态"`
|
|
}
|
|
|
|
// GetActiveSubscriptionsQuery 获取活跃订阅查询
|
|
type GetActiveSubscriptionsQuery struct {
|
|
UserID string `form:"user_id" comment:"用户ID"`
|
|
}
|