36 lines
1.9 KiB
Go
36 lines
1.9 KiB
Go
|
package gmodel
|
|||
|
|
|||
|
import (
|
|||
|
"gorm.io/gorm"
|
|||
|
"time"
|
|||
|
)
|
|||
|
|
|||
|
// fs_orders_trade 订单交易记录表
|
|||
|
type FsOrdersTrade struct {
|
|||
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // 订单交易ID
|
|||
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
|
|||
|
OrderNo *string `gorm:"default:'';" json:"order_no"` //
|
|||
|
OrderSource *string `gorm:"default:'';" json:"order_source"` //
|
|||
|
TradeNo *string `gorm:"index;default:'';" json:"trade_no"` //
|
|||
|
PayAmount *int64 `gorm:"default:0;" json:"pay_amount"` // 支付金额 (分)
|
|||
|
PayStatus *int64 `gorm:"default:0;" json:"pay_status"` // 支付状态:1=未成功,2=已成功
|
|||
|
PaymentMethod *int64 `gorm:"default:0;" json:"payment_method"` // 支付方式:1=stripe,2=paypal
|
|||
|
PayStage *int64 `gorm:"default:0;" json:"pay_stage"` // 支付阶段:1=首付,2=尾款
|
|||
|
RefundStatus *int64 `gorm:"default:0;" json:"refund_status"` // 退款状态:1=未退款,2=已退款
|
|||
|
CardNo *string `gorm:"default:'';" json:"card_no"` //
|
|||
|
CardBrand *string `gorm:"default:'';" json:"card_brand"` //
|
|||
|
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
|||
|
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
|||
|
Country *string `gorm:"default:'';" json:"country"` //
|
|||
|
Currency *string `gorm:"default:'';" json:"currency"` //
|
|||
|
Metadata *[]byte `gorm:"default:'';" json:"metadata"` //
|
|||
|
}
|
|||
|
type FsOrdersTradeModel struct {
|
|||
|
db *gorm.DB
|
|||
|
name string
|
|||
|
}
|
|||
|
|
|||
|
func NewFsOrdersTradeModel(db *gorm.DB) *FsOrdersTradeModel {
|
|||
|
return &FsOrdersTradeModel{db: db, name: "fs_orders_trade"}
|
|||
|
}
|