| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- package entity
- // DtConfig 系统配置表
- type DtConfig struct {
- MysqlBaseModel
- Group string `json:"group" gorm:"type:varchar(64);index:idx_group;comment:配置分组"`
- Key string `json:"key" gorm:"type:varchar(128);uniqueIndex:uk_key;comment:配置键"`
- Value string `json:"value" gorm:"type:text;comment:配置值"`
- Type string `json:"type" gorm:"type:varchar(32);default:string;comment:类型: string/number/boolean/json"`
- Name string `json:"name" gorm:"type:varchar(128);comment:配置名称"`
- Description string `json:"description" gorm:"type:varchar(255);comment:配置描述"`
- Sort int `json:"sort" gorm:"default:0;comment:排序"`
- }
- func (*DtConfig) TableName() string {
- return "dt_config"
- }
- func (*DtConfig) Comment() string {
- return "系统配置表"
- }
- func NewDtConfig() *DtConfig {
- return &DtConfig{}
- }
- // 常用配置键
- const (
- ConfigKeyCommissionRate1 = "bfb_1" // 一级返佣比例
- ConfigKeyInviteBonus = "xshare_bonus" // 直推奖励金额
- ConfigKeyEnableInviteBonus = "is_share_bonus" // 是否启用直推奖励
- ConfigKeyWithdrawFee = "charge" // 提现手续费
- ConfigKeyMinWithdraw = "min_withdraw" // 最低提现金额
- ConfigKeySmsUser = "smsbao_user" // 短信宝账号
- ConfigKeySmsPass = "smsbao_pass" // 短信宝密码
- ConfigKeySmsSign = "smsbao_sign" // 短信签名
- ConfigKeyKefuEmail = "kefu_email" // 客服邮箱
- ConfigKeyKefuTelegram = "kefu_telegram" // 客服Telegram
- ConfigKeyKefuPhone = "kefu_phone" // 客服电话
- ConfigKeyGoogleClientId = "google_client_id" // Google OAuth Client ID
- ConfigKeyZaloAppId = "zalo_app_id" // Zalo App ID
- ConfigKeyZaloSecret = "zalo_secret" // Zalo Secret Key
- ConfigKeyTelegramBotName = "telegram_bot_name" // Telegram Bot 用户名
- ConfigKeyTelegramBotId = "telegram_bot_id" // Telegram Bot 数字ID
- ConfigKeySmtpHost = "smtp_host" // SMTP服务器地址
- ConfigKeySmtpPort = "smtp_port" // SMTP端口
- ConfigKeySmtpUser = "smtp_user" // SMTP用户名(发件邮箱)
- ConfigKeySmtpPass = "smtp_pass" // SMTP密码/授权码
- ConfigKeySmtpFrom = "smtp_from" // 发件人名称
- ConfigKeyTiktokClientKey = "tiktok_client_key" // TikTok Client Key
- ConfigKeyTiktokClientSecret = "tiktok_client_secret" // TikTok Client Secret
- ConfigKeyFacebookAppId = "facebook_app_id" // Facebook App ID
- ConfigKeyFacebookAppSecret = "facebook_app_secret" // Facebook App Secret
- )
|