feat: 添加独立的支付通道管理功能
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type PaymentChannel struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Name string `gorm:"size:50;not null" json:"name"`
|
||||
Code string `gorm:"size:30;not null;uniqueIndex" json:"code"`
|
||||
Type string `gorm:"size:20;not null" json:"type"`
|
||||
Icon string `gorm:"size:255" json:"icon"`
|
||||
FeeRate float64 `gorm:"default:0" json:"fee_rate"`
|
||||
MinAmount float64 `gorm:"default:0" json:"min_amount"`
|
||||
MaxAmount float64 `gorm:"default:0" json:"max_amount"`
|
||||
Config string `gorm:"type:text" json:"config"`
|
||||
IsEnabled bool `gorm:"default:true" json:"is_enabled"`
|
||||
SortOrder int `gorm:"default:0" json:"sort_order"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
}
|
||||
|
||||
func (PaymentChannel) TableName() string {
|
||||
return "payment_channels"
|
||||
}
|
||||
Reference in New Issue
Block a user