refactor platform logic and add gasorder domain

This commit is contained in:
david
2026-07-28 10:42:26 +08:00
parent 8c6d52cf8c
commit 899fc6186b
44 changed files with 1636 additions and 1446 deletions

View File

@@ -0,0 +1,15 @@
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" }