draft
This commit is contained in:
32
backend/internal/model/refund_order.go
Normal file
32
backend/internal/model/refund_order.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// RefundStatus 退款状态
|
||||
type RefundStatus string
|
||||
|
||||
const (
|
||||
RefundStatusPending RefundStatus = "PENDING"
|
||||
RefundStatusProcessing RefundStatus = "PROCESSING"
|
||||
RefundStatusSuccess RefundStatus = "SUCCESS"
|
||||
RefundStatusFailed RefundStatus = "FAILED"
|
||||
)
|
||||
|
||||
// RefundOrder 退款记录
|
||||
type RefundOrder struct {
|
||||
ID uint64 `gorm:"column:id;primaryKey;autoIncrement"`
|
||||
RefundNo string `gorm:"column:refund_no;uniqueIndex;size:32;not null"`
|
||||
TradeNo string `gorm:"column:trade_no;size:32;not null;index"`
|
||||
AppID string `gorm:"column:app_id;size:32;not null"`
|
||||
ChannelCode string `gorm:"column:channel_code;size:32;not null"`
|
||||
ChannelRefundNo string `gorm:"column:channel_refund_no;size:64"`
|
||||
RefundAmount int64 `gorm:"column:refund_amount;not null"`
|
||||
Reason string `gorm:"column:reason;size:256"`
|
||||
Status RefundStatus `gorm:"column:status;size:20;not null;default:PENDING"`
|
||||
NotifyURL string `gorm:"column:notify_url;size:512"`
|
||||
RefundTime *time.Time `gorm:"column:refund_time"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime:milli"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime:milli"`
|
||||
}
|
||||
|
||||
func (RefundOrder) TableName() string { return "refund_order" }
|
||||
Reference in New Issue
Block a user