字段中的blob和JSON类型映射为[]byte和dbs.JSON

This commit is contained in:
GoEdgeLab
2022-03-21 21:39:36 +08:00
parent a2cf2e5b03
commit 31599bee13
105 changed files with 1537 additions and 1156 deletions

View File

@@ -1,24 +1,26 @@
package models
import "github.com/iwind/TeaGo/dbs"
// NodeThreshold 集群阈值设置
type NodeThreshold struct {
Id uint64 `field:"id"` // ID
Role string `field:"role"` // 节点角色
ClusterId uint32 `field:"clusterId"` // 集群ID
NodeId uint32 `field:"nodeId"` // 节点ID
IsOn uint8 `field:"isOn"` // 是否启用
Item string `field:"item"` // 监控项
Param string `field:"param"` // 参数
Operator string `field:"operator"` // 操作符
Value string `field:"value"` // 对比值
Message string `field:"message"` // 消息内容
NotifyDuration uint32 `field:"notifyDuration"` // 通知间隔
NotifiedAt uint32 `field:"notifiedAt"` // 上次通知时间
Duration uint32 `field:"duration"` // 时间段
DurationUnit string `field:"durationUnit"` // 时间段单位
SumMethod string `field:"sumMethod"` // 聚合方法
Order uint32 `field:"order"` // 排序
State uint8 `field:"state"` // 状态
Id uint64 `field:"id"` // ID
Role string `field:"role"` // 节点角色
ClusterId uint32 `field:"clusterId"` // 集群ID
NodeId uint32 `field:"nodeId"` // 节点ID
IsOn uint8 `field:"isOn"` // 是否启用
Item string `field:"item"` // 监控项
Param string `field:"param"` // 参数
Operator string `field:"operator"` // 操作符
Value dbs.JSON `field:"value"` // 对比值
Message string `field:"message"` // 消息内容
NotifyDuration uint32 `field:"notifyDuration"` // 通知间隔
NotifiedAt uint32 `field:"notifiedAt"` // 上次通知时间
Duration uint32 `field:"duration"` // 时间段
DurationUnit string `field:"durationUnit"` // 时间段单位
SumMethod string `field:"sumMethod"` // 聚合方法
Order uint32 `field:"order"` // 排序
State uint8 `field:"state"` // 状态
}
type NodeThresholdOperator struct {