ot_fire_events.go 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package models
  2. import (
  3. "time"
  4. "go-admin/common/models"
  5. )
  6. type OtFireEvents struct {
  7. models.Model
  8. AppId int64 `json:"appId" gorm:"type:bigint(11);comment:业务ID"`
  9. RuleId int64 `json:"ruleId" gorm:"type:bigint(11);comment:RuleId"`
  10. ExceptionName string `json:"exceptionName" gorm:"type:varchar(256);comment:告警名称/信息"`
  11. RecordTime time.Time `json:"recordTime" gorm:"type:datetime;comment:RecordTime"`
  12. AppendTime time.Time `json:"appendTime" gorm:"type:datetime;comment:AppendTime"`
  13. Uid string `json:"uid" gorm:"type:varchar(32);comment:Uid"`
  14. AppName string `json:"appName" gorm:"type:varchar(32);comment:AppName"`
  15. AppAlias string `json:"appAlias" gorm:"type:varchar(32);comment:AppAlias"`
  16. RuleInfo string `json:"ruleInfo" gorm:"type:varchar(256);comment:RuleInfo"`
  17. RowResult string `json:"rowResult" gorm:"type:varchar(32);comment:RowResult"`
  18. RowsResult string `json:"rowsResult" gorm:"type:tinytext;comment:RowsResult"`
  19. AlertStatus int64 `json:"alertStatus" gorm:"type:tinyint(1);comment:AlertStatus"`
  20. IsKnow int64 `json:"isKnow" gorm:"type:tinyint(1);comment:已知悉"`
  21. IsResolve int64 `json:"isResolve" gorm:"type:tinyint(1);comment:已解决"`
  22. IsIgnore int64 `json:"isIgnore" gorm:"type:tinyint(1);comment:已忽略"`
  23. models.ModelTime
  24. models.ControlBy
  25. }
  26. func (OtFireEvents) TableName() string {
  27. return "ot_fire_events"
  28. }
  29. func (e *OtFireEvents) Generate() models.ActiveRecord {
  30. o := *e
  31. return &o
  32. }
  33. func (e *OtFireEvents) GetId() interface{} {
  34. return e.Id
  35. }