39 lines
1.9 KiB
Go
39 lines
1.9 KiB
Go
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"`
|
||
}
|