Files
platforms/backend/api/internal/models/gasorder_payment.go

16 lines
1.1 KiB
Go
Raw Permalink 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 "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"` // 订单自增主键
PaymentOrderID uint64 `gorm:"column:payment_order_id;not null;uniqueIndex" json:"payment_order_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" }