优化表结构,重构模型,重新实现基于白银网关的提取节点流程
This commit is contained in:
26
web/models/refund.go
Normal file
26
web/models/refund.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"platform/web/core"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
// Refund 退款记录表
|
||||
type Refund struct {
|
||||
core.Model
|
||||
TradeID int32 `json:"trade_id" gorm:"column:trade_id"` // 订单ID
|
||||
ProductID *int32 `json:"product_id" gorm:"column:product_id"` // 产品ID
|
||||
Amount decimal.Decimal `json:"amount" gorm:"column:amount"` // 退款金额
|
||||
Reason *string `json:"reason" gorm:"column:reason"` // 退款原因
|
||||
Status RefundStatus `json:"status" gorm:"column:status"` // 退款状态:0-待处理,1-已退款,2-已拒绝
|
||||
}
|
||||
|
||||
// RefundStatus 退款状态枚举
|
||||
type RefundStatus int
|
||||
|
||||
const (
|
||||
RefundStatusPending RefundStatus = 0 // 待处理
|
||||
RefundStatusRefunded RefundStatus = 1 // 已退款
|
||||
RefundStatusRejected RefundStatus = 2 // 已拒绝
|
||||
)
|
||||
Reference in New Issue
Block a user