22 lines
1.4 KiB
Go
22 lines
1.4 KiB
Go
package model
|
||
|
||
import "time"
|
||
|
||
// WechatCallbackLog 微信回调日志(转账结果通知、支付通知等)
|
||
// 表名 wechat_callback_logs
|
||
type WechatCallbackLog struct {
|
||
ID int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
||
CallbackType string `gorm:"column:callback_type;size:32;index" json:"callbackType"` // transfer | pay
|
||
OutBatchNo string `gorm:"column:out_batch_no;size:64;index" json:"outBatchNo"` // 商家批次单号
|
||
OutDetailNo string `gorm:"column:out_detail_no;size:64;index" json:"outDetailNo"` // 商家明细单号(转账即 out_bill_no)
|
||
TransferBillNo string `gorm:"column:transfer_bill_no;size:64" json:"transferBillNo"` // 微信转账单号
|
||
State string `gorm:"column:state;size:32" json:"state"` // SUCCESS | FAIL | CANCELLED 等
|
||
FailReason string `gorm:"column:fail_reason;size:500" json:"failReason"`
|
||
HandlerResult string `gorm:"column:handler_result;size:20" json:"handlerResult"` // success | fail
|
||
HandlerError string `gorm:"column:handler_error;size:1000" json:"handlerError"` // 业务处理错误信息
|
||
RequestBody string `gorm:"column:request_body;type:text" json:"-"` // 原始/解密后 body(可选,不输出 JSON)
|
||
CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
|
||
}
|
||
|
||
func (WechatCallbackLog) TableName() string { return "wechat_callback_logs" }
|