mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-01-06 23:45:47 +08:00
节点IP增加是否启用、是否在线状态
This commit is contained in:
28
internal/db/models/node_ip_address_log_dao.go
Normal file
28
internal/db/models/node_ip_address_log_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 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()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user