mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-24 15:30:24 +08:00
实现用户系统手机号码绑定和登录(商业版)
This commit is contained in:
28
internal/db/models/user_mobile_verification_dao.go
Normal file
28
internal/db/models/user_mobile_verification_dao.go
Normal 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()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user