mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-15 09:10:24 +08:00
增加基础的用户邮件通知
This commit is contained in:
28
internal/db/models/user_email_notification_dao.go
Normal file
28
internal/db/models/user_email_notification_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 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()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user