voucher/internal/biz/bo/wechat_voucher_bo.go

39 lines
1.9 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package bo
import "voucher/internal/biz/vo"
// ConsumeInformation 定义消费信息结构体
type ConsumeInformation struct {
ConsumeTime string `json:"consume_time"` // 代金券核销时间遵循rfc3339标准格式格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE
ConsumeMchid string `json:"consume_mchid"` // 核销代金券的商户号
TransactionID string `json:"transaction_id"` // 微信支付系统生成的订单号
ConsumeAmount int64 `json:"consume_amount,omitempty"` // 核销金额仅有当business_type=MULTIUSE时才会返回。单位
}
// PlainText 定义明文数据结构体
type PlainText struct {
StockCreatorMchid string `json:"stock_creator_mchid"`
StockID string `json:"stock_id"`
CouponID string `json:"coupon_id"`
CouponName string `json:"coupon_name"`
Description string `json:"description"`
Status vo.WechatVoucherStatus `json:"status"`
CreateTime string `json:"create_time"`
CouponType string `json:"coupon_type"`
NoCash bool `json:"no_cash"`
Singleitem bool `json:"singleitem"`
ConsumeInformation ConsumeInformation `json:"consume_information,omitempty"`
BusinessType string `json:"business_type,omitempty"` // 枚举值 MULTIUSE消费金仅有当business_type=MULTIUSE时才会返回
}
type WechatVoucherNotifyBo struct {
ID string `json:"id"`
CreateTime string `json:"create_time"`
ResourceType string `json:"resource_type"`
EventType string `json:"event_type"`
Summary string `json:"summary"`
OriginalType string `json:"original_type"`
AssociatedData string `json:"associated_data"`
PlainText PlainText `json:"plain_text"`
}