更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

+4 -16
View File
@@ -2,25 +2,16 @@ package models
import "time"
// 身份状态
const (
AuthIdentityStatusEnabled = 1 // 启用
AuthIdentityStatusDisabled = 0 // 禁用
AuthIdentityStatusLocked = 2 // 锁定(连续失败过多)
AuthIdentityStatusEnabled = 1
AuthIdentityStatusDisabled = 0
AuthIdentityStatusLocked = 2
)
// AuthIdentity 统一身份(自然人):yz_auth_identity
//
// 统一认证中心的核心表。密码上提到这一层,一个自然人一份密码,
// 通过 yz_auth_tenant_user 绑定到多家企业(一人可在多家企业任职)。
//
// password_hash 存储 PHC 格式($argon2id$v=19$m=...,t=...,p=...$salt$hash),
// 盐与参数内联,无需独立 salt 列;历史数据为 salt$sha256(legacy),
// 首次登录成功时自动重新哈希为 argon2id。
type AuthIdentity struct {
ID uint64 `orm:"column(id);pk;auto" json:"id"`
UnionID string `orm:"column(union_id);size(32)" json:"union_id"`
Account *string `orm:"column(account);size(64);null" json:"account"` // 全局登录账号(账号注册;手机号注册身份为 NULL)
Account *string `orm:"column(account);size(64);null" json:"account"`
Mobile *string `orm:"column(mobile);size(20);null" json:"mobile"`
Email *string `orm:"column(email);size(128);null" json:"email"`
PasswordAlgo string `orm:"column(password_algo);size(16);default(argon2id)" json:"password_algo"`
@@ -44,7 +35,6 @@ func (m *AuthIdentity) TableName() string {
return "yz_auth_identity"
}
// 第三方登录 provider 常量
const (
IdPWechat = "wechat"
IdPWechatMini = "wechat_mini"
@@ -55,8 +45,6 @@ const (
IdPGoogle = "google"
)
// AuthIdentityThird 第三方身份绑定:yz_auth_identity_third
// 同一身份可绑定多个第三方账号;同一 provider 的 open_id 全局唯一。
type AuthIdentityThird struct {
ID uint64 `orm:"column(id);pk;auto" json:"id"`
IdentityID uint64 `orm:"column(identity_id)" json:"identity_id"`