节点IP增加是否启用、是否在线状态

This commit is contained in:
GoEdgeLab
2021-08-18 09:24:18 +08:00
parent 2310791782
commit 9a57030ff1
10 changed files with 151 additions and 32 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 NodeIPAddressLogDAO dbs.DAO
func NewNodeIPAddressLogDAO() *NodeIPAddressLogDAO {
return dbs.NewDAO(&NodeIPAddressLogDAO{
DAOObject: dbs.DAOObject{
DB: Tea.Env,
Table: "edgeNodeIPAddressLogs",
Model: new(NodeIPAddressLog),
PkName: "id",
},
}).(*NodeIPAddressLogDAO)
}
var SharedNodeIPAddressLogDAO *NodeIPAddressLogDAO
func init() {
dbs.OnReady(func() {
SharedNodeIPAddressLogDAO = NewNodeIPAddressLogDAO()
})
}