temp
This commit is contained in:
@@ -41,6 +41,7 @@ const (
|
||||
SMSSceneResetPassword SMSScene = "reset_password" // 重置密码 - 忘记密码重置
|
||||
SMSSceneBind SMSScene = "bind" // 绑定手机号 - 绑定新手机号
|
||||
SMSSceneUnbind SMSScene = "unbind" // 解绑手机号 - 解绑当前手机号
|
||||
SMSSceneCertification SMSScene = "certification" // 企业认证 - 企业入驻认证
|
||||
)
|
||||
|
||||
// BeforeCreate GORM钩子:创建前自动生成UUID
|
||||
@@ -195,6 +196,7 @@ func (s *SMSCode) IsSceneValid() bool {
|
||||
SMSSceneResetPassword,
|
||||
SMSSceneBind,
|
||||
SMSSceneUnbind,
|
||||
SMSSceneCertification,
|
||||
}
|
||||
|
||||
for _, scene := range validScenes {
|
||||
@@ -214,6 +216,7 @@ func (s *SMSCode) GetSceneName() string {
|
||||
SMSSceneResetPassword: "重置密码",
|
||||
SMSSceneBind: "绑定手机号",
|
||||
SMSSceneUnbind: "解绑手机号",
|
||||
SMSSceneCertification: "企业认证",
|
||||
}
|
||||
|
||||
if name, exists := sceneNames[s.Scene]; exists {
|
||||
@@ -283,6 +286,7 @@ func IsValidScene(scene SMSScene) bool {
|
||||
SMSSceneResetPassword,
|
||||
SMSSceneBind,
|
||||
SMSSceneUnbind,
|
||||
SMSSceneCertification,
|
||||
}
|
||||
|
||||
for _, validScene := range validScenes {
|
||||
@@ -302,6 +306,7 @@ func GetSceneName(scene SMSScene) string {
|
||||
SMSSceneResetPassword: "重置密码",
|
||||
SMSSceneBind: "绑定手机号",
|
||||
SMSSceneUnbind: "解绑手机号",
|
||||
SMSSceneCertification: "企业认证",
|
||||
}
|
||||
|
||||
if name, exists := sceneNames[scene]; exists {
|
||||
|
||||
Reference in New Issue
Block a user