16 lines
1.1 KiB
Go
16 lines
1.1 KiB
Go
package models
|
||
|
||
import "git.apinb.com/bsm-sdk/core/database"
|
||
|
||
// GasorderPayment 对应 gasorder_payment,保存订单支付尝试与统一钱包支付关联。
|
||
type GasorderPayment struct {
|
||
Entity // 公共实体字段,Status 保存支付尝试状态
|
||
GasorderBasicID uint64 `gorm:"column:gasorder_basic_id;not null;index;uniqueIndex:idx_gasorder_payment_attempt" json:"gasorder_basic_id"` // 订单自增主键
|
||
WalletPaymentID uint64 `gorm:"column:wallet_payment_id;not null;uniqueIndex" json:"wallet_payment_id"` // 钱包支付记录自增主键
|
||
AttemptNo int `gorm:"column:attempt_no;not null;uniqueIndex:idx_gasorder_payment_attempt" json:"attempt_no"` // 支付尝试序号
|
||
Amount int64 `gorm:"column:amount;not null;check:amount > 0" json:"amount"` // 支付金额,单位分
|
||
}
|
||
|
||
func init() { database.AppendMigrate(&GasorderPayment{}) }
|
||
func (table *GasorderPayment) TableName() string { return "gasorder_payment" }
|