mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 15:00:27 +08:00
29 lines
527 B
Go
29 lines
527 B
Go
package models
|
|
|
|
import (
|
|
_ "github.com/go-sql-driver/mysql"
|
|
"github.com/iwind/TeaGo/Tea"
|
|
"github.com/iwind/TeaGo/dbs"
|
|
)
|
|
|
|
type UserPlanStatDAO dbs.DAO
|
|
|
|
func NewUserPlanStatDAO() *UserPlanStatDAO {
|
|
return dbs.NewDAO(&UserPlanStatDAO{
|
|
DAOObject: dbs.DAOObject{
|
|
DB: Tea.Env,
|
|
Table: "edgeUserPlanStats",
|
|
Model: new(UserPlanStat),
|
|
PkName: "id",
|
|
},
|
|
}).(*UserPlanStatDAO)
|
|
}
|
|
|
|
var SharedUserPlanStatDAO *UserPlanStatDAO
|
|
|
|
func init() {
|
|
dbs.OnReady(func() {
|
|
SharedUserPlanStatDAO = NewUserPlanStatDAO()
|
|
})
|
|
}
|