Files
EdgeAPI/internal/db/models/user_email_notification_dao.go

29 lines
626 B
Go
Raw Permalink Normal View History

2022-12-27 18:53:49 +08:00
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()
})
}