修复(#84): 补齐促销管理API实现文件
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -436,6 +436,21 @@ type CreatePaymentMethodRequest struct {
|
||||
Enable *bool `json:"enable" validate:"required"`
|
||||
}
|
||||
|
||||
type CreatePromoRuleRequest struct {
|
||||
Name string `json:"name" validate:"required,max=100"`
|
||||
Type string `json:"type" validate:"required,oneof=new_user inactive_user campaign"`
|
||||
Params json.RawMessage `json:"params" validate:"required"`
|
||||
Priority int64 `json:"priority" validate:"gte=0"`
|
||||
Enabled *bool `json:"enabled" validate:"required"`
|
||||
StartTime int64 `json:"start_time" validate:"required"`
|
||||
EndTime int64 `json:"end_time" validate:"required"`
|
||||
}
|
||||
|
||||
type CreatePromoPriceRequest struct {
|
||||
PromoRuleId int64 `json:"promo_rule_id" validate:"required"`
|
||||
Items []PromoPriceInput `json:"items" validate:"required,dive"`
|
||||
}
|
||||
|
||||
type CreateQuotaTaskRequest struct {
|
||||
Subscribers []int64 `json:"subscribers"`
|
||||
IsActive *bool `json:"is_active"`
|
||||
@@ -619,6 +634,14 @@ type DeletePaymentMethodRequest struct {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
}
|
||||
|
||||
type DeletePromoPriceRequest struct {
|
||||
Id int64 `path:"id" validate:"required"`
|
||||
}
|
||||
|
||||
type DeletePromoRuleRequest struct {
|
||||
Id int64 `path:"id" validate:"required"`
|
||||
}
|
||||
|
||||
type DeleteRedemptionCodeRequest struct {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
}
|
||||
@@ -1327,6 +1350,48 @@ type GetPaymentMethodListResponse struct {
|
||||
List []PaymentMethodDetail `json:"list"`
|
||||
}
|
||||
|
||||
type GetPromoPriceListRequest struct {
|
||||
Page int64 `form:"page" validate:"required"`
|
||||
Size int64 `form:"size" validate:"required"`
|
||||
PromoRuleId int64 `form:"promo_rule_id" validate:"required"`
|
||||
}
|
||||
|
||||
type GetPromoPriceListResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
List []PromoPrice `json:"list"`
|
||||
}
|
||||
|
||||
type GetPromoRuleDetailRequest struct {
|
||||
Id int64 `path:"id" validate:"required"`
|
||||
}
|
||||
|
||||
type GetPromoRuleListRequest struct {
|
||||
Page int64 `form:"page" validate:"required"`
|
||||
Size int64 `form:"size" validate:"required"`
|
||||
Type string `form:"type,omitempty" validate:"omitempty,oneof=new_user inactive_user campaign"`
|
||||
Enabled *bool `form:"enabled,omitempty"`
|
||||
Search string `form:"search,omitempty"`
|
||||
}
|
||||
|
||||
type GetPromoRuleListResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
List []PromoRule `json:"list"`
|
||||
}
|
||||
|
||||
type GetPromoUsageListRequest struct {
|
||||
Page int64 `form:"page" validate:"required"`
|
||||
Size int64 `form:"size" validate:"required"`
|
||||
PromoRuleId int64 `form:"rule_id,omitempty"`
|
||||
UserId int64 `form:"user_id,omitempty"`
|
||||
SubscribeId int64 `form:"subscribe_id,omitempty"`
|
||||
OrderNo string `form:"order_no,omitempty"`
|
||||
}
|
||||
|
||||
type GetPromoUsageListResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
List []PromoUsage `json:"list"`
|
||||
}
|
||||
|
||||
type GetPreSendEmailCountRequest struct {
|
||||
Scope int8 `json:"scope"`
|
||||
RegisterStartTime int64 `json:"register_start_time,omitempty"`
|
||||
@@ -2039,6 +2104,44 @@ type PrePurchaseOrderResponse struct {
|
||||
FeeAmount int64 `json:"fee_amount"`
|
||||
}
|
||||
|
||||
type PromoPrice struct {
|
||||
Id int64 `json:"id"`
|
||||
SubscribeId int64 `json:"subscribe_id"`
|
||||
PromoRuleId int64 `json:"promo_rule_id"`
|
||||
PromoPrice int64 `json:"promo_price"`
|
||||
UnitPrice int64 `json:"unit_price"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
|
||||
type PromoPriceInput struct {
|
||||
SubscribeId int64 `json:"subscribe_id" validate:"required"`
|
||||
PromoPrice int64 `json:"promo_price" validate:"required,gt=0"`
|
||||
}
|
||||
|
||||
type PromoRule struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Params json.RawMessage `json:"params"`
|
||||
Priority int64 `json:"priority"`
|
||||
Enabled bool `json:"enabled"`
|
||||
StartTime int64 `json:"start_time"`
|
||||
EndTime int64 `json:"end_time"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
|
||||
type PromoUsage struct {
|
||||
Id int64 `json:"id"`
|
||||
UserId int64 `json:"user_id"`
|
||||
PromoRuleId int64 `json:"promo_rule_id"`
|
||||
SubscribeId int64 `json:"subscribe_id"`
|
||||
OrderNo string `json:"order_no"`
|
||||
PromoPrice int64 `json:"promo_price"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
}
|
||||
|
||||
type PreRenewalOrderResponse struct {
|
||||
OrderNo string `json:"orderNo"`
|
||||
}
|
||||
@@ -3207,6 +3310,17 @@ type UpdatePaymentMethodRequest struct {
|
||||
Enable *bool `json:"enable" validate:"required"`
|
||||
}
|
||||
|
||||
type UpdatePromoRuleRequest struct {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
Name string `json:"name" validate:"required,max=100"`
|
||||
Type string `json:"type" validate:"required,oneof=new_user inactive_user campaign"`
|
||||
Params json.RawMessage `json:"params" validate:"required"`
|
||||
Priority int64 `json:"priority" validate:"gte=0"`
|
||||
Enabled *bool `json:"enabled" validate:"required"`
|
||||
StartTime int64 `json:"start_time" validate:"required"`
|
||||
EndTime int64 `json:"end_time" validate:"required"`
|
||||
}
|
||||
|
||||
type UpdateRedemptionCodeRequest struct {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
TotalCount int64 `json:"total_count,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user