ot_alert_policy.go 761 B

123456789101112131415161718192021222324252627282930
  1. package models
  2. import (
  3. "go-admin/common/models"
  4. )
  5. type OtAlertPolicy struct {
  6. models.Model
  7. AppId int64 `json:"appId" gorm:"type:bigint(11);comment:业务ID"`
  8. RuleId int64 `json:"ruleId" gorm:"type:bigint(20);comment:监控规则ID"`
  9. MonitorAlias string `json:"monitorAlias" gorm:"type:varchar(64);comment:监控项别名"`
  10. Policy string `json:"policy" gorm:"type:varchar(256);comment:告警策略"`
  11. Power int64 `json:"power" gorm:"type:tinyint(1);comment:是否启用"`
  12. models.ModelTime
  13. models.ControlBy
  14. }
  15. func (OtAlertPolicy) TableName() string {
  16. return "ot_alert_policy"
  17. }
  18. func (e *OtAlertPolicy) Generate() models.ActiveRecord {
  19. o := *e
  20. return &o
  21. }
  22. func (e *OtAlertPolicy) GetId() interface{} {
  23. return e.Id
  24. }