实现用户系统手机号码绑定和登录(商业版)

This commit is contained in:
GoEdgeLab
2023-11-17 11:51:29 +08:00
parent 7e5c77af69
commit 1e2df532d3
9 changed files with 223 additions and 26 deletions

View File

@@ -0,0 +1,28 @@
package models
import (
_ "github.com/go-sql-driver/mysql"
"github.com/iwind/TeaGo/Tea"
"github.com/iwind/TeaGo/dbs"
)
type UserMobileVerificationDAO dbs.DAO
func NewUserMobileVerificationDAO() *UserMobileVerificationDAO {
return dbs.NewDAO(&UserMobileVerificationDAO{
DAOObject: dbs.DAOObject{
DB: Tea.Env,
Table: "edgeUserMobileVerifications",
Model: new(UserMobileVerification),
PkName: "id",
},
}).(*UserMobileVerificationDAO)
}
var SharedUserMobileVerificationDAO *UserMobileVerificationDAO
func init() {
dbs.OnReady(func() {
SharedUserMobileVerificationDAO = NewUserMobileVerificationDAO()
})
}