开始增加支付-1
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/datatypes"
|
||||
)
|
||||
|
||||
type PaymentOrder struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
PaymentNo string `gorm:"size:64;not null;uniqueIndex" json:"payment_no"`
|
||||
OrderID uint64 `gorm:"not null;index" json:"order_id"`
|
||||
OrderNo string `gorm:"size:64;not null;index" json:"order_no"`
|
||||
UserID uint64 `gorm:"not null;index" json:"user_id"`
|
||||
Provider string `gorm:"size:32;not null" json:"provider"`
|
||||
MerchantID string `gorm:"size:32;not null;default:''" json:"merchant_id"`
|
||||
ThirdOrderID string `gorm:"size:64;not null;uniqueIndex" json:"third_order_id"`
|
||||
ProviderOrderID string `gorm:"size:64;not null;default:'';index" json:"provider_order_id"`
|
||||
PayWay string `gorm:"size:16;not null;default:''" json:"pay_way"`
|
||||
JSPayFlag string `gorm:"column:jspay_flag;size:8;not null;default:''" json:"jspay_flag"`
|
||||
AmountCent int64 `gorm:"not null;default:0" json:"amount_cent"`
|
||||
Status string `gorm:"size:32;not null;default:'created';index" json:"status"`
|
||||
TDCode string `gorm:"size:512;not null;default:''" json:"td_code"`
|
||||
JSPayURL string `gorm:"column:jspay_url;size:512;not null;default:''" json:"jspay_url"`
|
||||
JSPayInfo string `gorm:"column:jspay_info;type:text" json:"jspay_info"`
|
||||
RawRequest datatypes.JSON `json:"raw_request"`
|
||||
RawResponse datatypes.JSON `json:"raw_response"`
|
||||
PaidAt *time.Time `json:"paid_at"`
|
||||
NotifiedAt *time.Time `json:"notified_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (PaymentOrder) TableName() string {
|
||||
return "payment_orders"
|
||||
}
|
||||
Reference in New Issue
Block a user