mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-11 03:33:53 +08:00
发布v2.15.7版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
@@ -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, "已解封"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user