feat: get support chain api

This commit is contained in:
Ginta
2026-04-14 19:03:39 +08:00
19 changed files with 1701 additions and 879 deletions
+9 -1
View File
@@ -8,9 +8,14 @@ const (
CallBackConfirmNo = 2
)
const (
PaymentTypeEpay = "Epay"
)
type Orders struct {
TradeId string `gorm:"column:trade_id;uniqueIndex:orders_trade_id_uindex" json:"trade_id"`
OrderId string `gorm:"column:order_id;uniqueIndex:orders_order_id_uindex" json:"order_id"`
OrderId string `gorm:"column:order_id;uniqueIndex:orders_order_id_uindex" json:"order_id"` // the order id is generated by client, and will notify client when order is paid
ParentTradeId string `gorm:"column:parent_trade_id;index:idx_orders_parent_trade_id;default:''" json:"parent_trade_id"`
BlockTransactionId string `gorm:"index:orders_block_transaction_id_index;column:block_transaction_id" json:"block_transaction_id"`
Amount float64 `gorm:"column:amount" json:"amount"`
Currency string `gorm:"column:currency" json:"currency"`
@@ -21,8 +26,11 @@ type Orders struct {
Status int `gorm:"column:status;default:1" json:"status"`
NotifyUrl string `gorm:"column:notify_url" json:"notify_url"`
RedirectUrl string `gorm:"column:redirect_url" json:"redirect_url"`
Name string `gorm:"column:name" json:"name"`
CallbackNum int `gorm:"column:callback_num;default:0" json:"callback_num"`
CallBackConfirm int `gorm:"column:callback_confirm;default:2" json:"callback_confirm"`
IsSelected bool `gorm:"column:is_selected;default:false" json:"is_selected"`
PaymentType string `gorm:"column:payment_type" json:"payment_type"`
BaseModel
}
+1 -1
View File
@@ -8,7 +8,7 @@ const (
const (
NetworkTron = "tron"
NetworkSolana = "solana"
NetworkEthereum = "eth"
NetworkEthereum = "ethereum"
NetworkBsc = "bsc"
NetworkPolygon = "polygon"
NetworkPlasma = "plasma"