This commit is contained in:
孟帅
2024-07-21 22:21:02 +08:00
parent 7d8330f72f
commit a37d088360
440 changed files with 6303 additions and 3339 deletions

View File

@@ -18,12 +18,6 @@ const (
EmsTemplateCash = "cash" // 申请提现
)
// 验证码状态
const (
EmsStatusNotUsed = 1 // 未使用
EmsStatusUsed = 2 // 已使用
)
var EmsSubjectMap = g.MapStrStr{
EmsTemplateText: "这是一封来自HotGo的邮件",
EmsTemplateCode: "验证码",

View File

@@ -5,6 +5,15 @@
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package consts
import (
"hotgo/internal/library/dict"
"hotgo/internal/model"
)
func init() {
dict.RegisterEnums("ServerLicenseGroupOptions", "服务授权分组选项", ServerLicenseGroupOptions)
}
// 授权分组
const (
LicenseGroupDefault = "default" // 默认组
@@ -12,8 +21,9 @@ const (
LicenseGroupAuth = "auth" // 服务授权
)
var LicenseGroupNameMap = map[string]string{
LicenseGroupDefault: "默认组",
LicenseGroupCron: "定时任务",
LicenseGroupAuth: "服务授权",
// ServerLicenseGroupOptions 服务授权分组选项
var ServerLicenseGroupOptions = []*model.Option{
dict.GenWarningOption(LicenseGroupDefault, "默认组"),
dict.GenSuccessOption(LicenseGroupCron, "定时任务"),
dict.GenSuccessOption(LicenseGroupAuth, "服务授权"),
}

View File

@@ -6,7 +6,6 @@
package consts
// 短信驱动
const (
SmsDriveAliYun = "aliyun" // 阿里云
SmsDriveTencent = "tencent" // 腾讯云
@@ -32,9 +31,3 @@ var (
SmsTemplateCash: "申请提现",
}
)
// 验证码状态
const (
SmsStatusNotUsed = 1 // 未使用
SmsStatusUsed = 2 // 已使用
)

View File

@@ -5,6 +5,16 @@
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package consts
import (
"hotgo/internal/library/dict"
"hotgo/internal/model"
)
func init() {
dict.RegisterEnums("CodeStatusOptions", "验证码状态选项", CodeStatusOptions)
dict.RegisterEnums("BlacklistStatusOptions", "黑名单拉黑状态选项", BlacklistStatusOptions)
}
// 状态码
const (
StatusALL int = -1 // 全部状态
@@ -14,3 +24,26 @@ const (
)
var StatusSlice = []int{StatusALL, StatusEnabled, StatusDisable, StatusDelete}
// 验证码状态
const (
CodeStatusNotUsed = 1 // 未使用
CodeStatusUsed = 2 // 已使用
)
// CodeStatusOptions 验证码状态选项
var CodeStatusOptions = []*model.Option{
dict.GenWarningOption(CodeStatusNotUsed, "未使用"),
dict.GenSuccessOption(CodeStatusUsed, "已使用"),
}
const (
BlacklistStatusDisable = 1 // 封禁中
BlacklistStatusEnabled = 2 // 已解封
)
// BlacklistStatusOptions 黑名单拉黑状态选项
var BlacklistStatusOptions = []*model.Option{
dict.GenWarningOption(BlacklistStatusDisable, "封禁中"),
dict.GenSuccessOption(BlacklistStatusEnabled, "已解封"),
}

View File

@@ -7,5 +7,5 @@ package consts
// VersionApp HotGo版本
const (
VersionApp = "2.15.1"
VersionApp = "2.15.7"
)