优化表结构,重构模型,重新实现基于白银网关的提取节点流程

This commit is contained in:
2025-11-24 18:44:06 +08:00
parent 9a574f55cb
commit cb2a963a37
142 changed files with 6528 additions and 5808 deletions

26
web/models/refund.go Normal file
View 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 // 已拒绝
)