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