修改账号注册方法,以及邮箱协议对接
This commit is contained in:
24
services/twitter_account_service.go
Normal file
24
services/twitter_account_service.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"go-account-register/models"
|
||||
"go-account-register/utils"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type TwitterAccountService struct {
|
||||
db *gorm.DB
|
||||
}
|
||||
|
||||
func InitTwitterAccountService() *TwitterAccountService {
|
||||
db := utils.GetDB()
|
||||
return &TwitterAccountService{db: db}
|
||||
}
|
||||
|
||||
func (t *TwitterAccountService) Create(params *models.TwitterAccount) {
|
||||
params.CreateTime = time.Now().Unix()
|
||||
params.UpdateTime = time.Now().Unix()
|
||||
t.db.Create(params)
|
||||
}
|
||||
Reference in New Issue
Block a user