[区域]可以设置区域-价格项目之间的价格

This commit is contained in:
GoEdgeLab
2020-12-10 22:07:21 +08:00
parent 2ce199455f
commit 7eecaa1224
14 changed files with 407 additions and 10 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 ServerStatDAO dbs.DAO
func NewServerStatDAO() *ServerStatDAO {
return dbs.NewDAO(&ServerStatDAO{
DAOObject: dbs.DAOObject{
DB: Tea.Env,
Table: "edgeServerStats",
Model: new(ServerStat),
PkName: "id",
},
}).(*ServerStatDAO)
}
var SharedServerStatDAO *ServerStatDAO
func init() {
dbs.OnReady(func() {
SharedServerStatDAO = NewServerStatDAO()
})
}