Files
platform/web/models/refund.go

27 lines
843 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 // 已拒绝
)