23 lines
1.1 KiB
Go
23 lines
1.1 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// ChannelConfig 渠道配置
|
|
type ChannelConfig struct {
|
|
ID uint64 `gorm:"column:id;primaryKey;autoIncrement"`
|
|
AppID string `gorm:"column:app_id;size:32;not null;uniqueIndex:uk_app_channel"`
|
|
ChannelCode string `gorm:"column:channel_code;size:32;not null;uniqueIndex:uk_app_channel"`
|
|
MerchantID string `gorm:"column:merchant_id;size:64;not null"`
|
|
APIKey string `gorm:"column:api_key;type:text"` // AES 加密
|
|
PrivateKey string `gorm:"column:private_key;type:text"` // AES 加密
|
|
PublicKey string `gorm:"column:public_key;type:text"` // 渠道公钥(明文)
|
|
NotifyURL string `gorm:"column:notify_url;size:512;not null"`
|
|
Sandbox int8 `gorm:"column:sandbox;not null;default:0"` // 1=沙箱 0=生产
|
|
ExtraConfig JSONMap `gorm:"column:extra_config;type:json"`
|
|
Status int8 `gorm:"column:status;not null;default:1"`
|
|
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime:milli"`
|
|
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime:milli"`
|
|
}
|
|
|
|
func (ChannelConfig) TableName() string { return "channel_config" }
|