27 lines
843 B
Go
27 lines
843 B
Go
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 // 已拒绝
|
||
)
|