增加基础的用户邮件通知

This commit is contained in:
刘祥超
2022-12-27 18:53:49 +08:00
parent 874139ea07
commit c9b666e5bc
8 changed files with 64 additions and 3 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 UserEmailNotificationDAO dbs.DAO
func NewUserEmailNotificationDAO() *UserEmailNotificationDAO {
return dbs.NewDAO(&UserEmailNotificationDAO{
DAOObject: dbs.DAOObject{
DB: Tea.Env,
Table: "edgeUserEmailNotifications",
Model: new(UserEmailNotification),
PkName: "id",
},
}).(*UserEmailNotificationDAO)
}
var SharedUserEmailNotificationDAO *UserEmailNotificationDAO
func init() {
dbs.OnReady(func() {
SharedUserEmailNotificationDAO = NewUserEmailNotificationDAO()
})
}