12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- package models
- import (
- "go-admin/common/models"
- )
- type OtMonitorRules struct {
- models.Model
- Kind string `json:"kind" gorm:"type:varchar(32);comment:所属分类:trace,metric,log"`
- Group string `json:"group" gorm:"type:varchar(64);comment:子类型,聚类筛选,可自添加"`
- Name string `json:"name" gorm:"type:varchar(128);comment:事件项名称,不可重复"`
- MonitorAlias string `json:"monitorAlias" gorm:"type:varchar(64);comment:监控项别名"`
- DataSource string `json:"dataSource" gorm:"type:varchar(11);comment:数据源"`
- Table string `json:"table" gorm:"type:varchar(32);comment:表名"`
- ValueType string `json:"valueType" gorm:"type:varchar(32);comment:值类型"`
- Expression string `json:"expression" gorm:"type:varchar(2048);comment:表达式"`
- Interval int64 `json:"interval" gorm:"type:int(11);comment:探测周期"`
- Verify int64 `json:"verify" gorm:"type:tinyint(1);comment:是否验证成功"`
- Power int64 `json:"power" gorm:"type:tinyint(1);comment:是否启用"`
- models.ModelTime
- models.ControlBy
- }
- type OtMRAndAP struct {
- models.Model
- Kind string `json:"kind" gorm:"type:varchar(32);comment:所属分类:trace,metric,log"`
- Group string `json:"group" gorm:"type:varchar(64);comment:子类型,聚类筛选,可自添加"`
- Name string `json:"name" gorm:"type:varchar(128);comment:事件项名称,不可重复"`
- MonitorAlias string `json:"monitorAlias" gorm:"type:varchar(64);comment:监控项别名"`
- DataSource string `json:"dataSource" gorm:"type:varchar(11);comment:数据源"`
- Table string `json:"table" gorm:"type:varchar(32);comment:表名"`
- ValueType string `json:"valueType" gorm:"type:varchar(32);comment:值类型"`
- Expression string `json:"expression" gorm:"type:varchar(2048);comment:表达式"`
- Interval int64 `json:"interval" gorm:"type:int(11);comment:探测周期"`
- Verify int64 `json:"verify" gorm:"type:tinyint(1);comment:是否验证成功"`
- Power int64 `json:"power" gorm:"type:tinyint(1);comment:是否启用"`
- PolicyId int64 `json:"policy_id" gorm:"type:bigint(20)"`
- AppId int64 `json:"app_id" gorm:"type:bigint(20)"`
- RuleId int64 `json:"rule_id" gorm:"type:bigint(20)"`
- Policy string `json:"policy" gorm:"type:varchar(256)"`
- ApPower int64 `json:"ap_power" gorm:"type:tinyint(1)"`
- models.ModelTime
- models.ControlBy
- }
- func (OtMonitorRules) TableName() string {
- return "ot_monitor_rules"
- }
- func (e *OtMonitorRules) Generate() models.ActiveRecord {
- o := *e
- return &o
- }
- func (e *OtMonitorRules) GetId() interface{} {
- return e.Id
- }
|