修改账号注册方法,以及邮箱协议对接

This commit is contained in:
zyj
2025-09-24 18:22:25 +08:00
parent 002419a7ed
commit 81ed379cf3
21 changed files with 1090 additions and 8 deletions

View 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)
}