Files
zt-closet-backend/internal/mysqlmodel/refundflowlog.go
T
2026-09-11 01:41:52 +08:00

23 lines
1.2 KiB
Go

package mysqlmodel
type RefundFlowLog struct {
Model
OrderID int64 `gorm:"column:order_id"` // 关联订单ID
OrderNo string `gorm:"column:order_no"` // 商户订单号(冗余,方便查询)
UserID int64 `gorm:"column:user_id"` // 用户ID(冗余,方便按用户查)
// RefundNo 商户退款单号;唯一索引为退款申请防重/重试幂等依据。
RefundNo string `gorm:"column:refund_no;uniqueIndex:uk_refund_flow_no"`
WechatRefundNo string `gorm:"column:wechat_refund_no"` // 微信退款单号
RefundAmount int64 `gorm:"column:refund_amount"` // 本次退款金额(分)
RefundReason string `gorm:"column:refund_reason"` // 退款原因
Status int8 `gorm:"column:status"` // 退款状态 0=待处理 1=退款中 2=退款成功 3=退款失败
ApplyTime int64 `gorm:"column:apply_time"` // 申请时间
SuccessTime int64 `gorm:"column:success_time"` // 退款成功时间
FailReason string `gorm:"column:fail_reason"` // 失败原因
CallbackRaw string `gorm:"column:callback_raw"` // 微信退款回调原始报文
}
func (RefundFlowLog) TableName() string {
return "refund_flow_logs"
}