alarm_relation.gen.go 1.6 KB

12345678910111213141516171819202122232425262728293031
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package model
  5. import (
  6. "time"
  7. )
  8. const TableNameAlarmRelation = "alarm_relation"
  9. // AlarmRelation mapped from table <alarm_relation>
  10. type AlarmRelation struct {
  11. ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` // 告警策略表
  12. Strategyid int64 `gorm:"column:strategyid" json:"strategyid,string"` // 策略ID。全局唯一
  13. Mpid int64 `gorm:"column:mpid" json:"mpid,string"` // 测点ID。全局唯一
  14. Alarmtype int32 `gorm:"column:alarmtype" json:"alarmtype"` // 测点告警类型。1-阈值告警,2-开关量告警,3-差值告警,4-视频告警,5-测点离线告警
  15. Uplimit float64 `gorm:"column:uplimit" json:"uplimit"` // 阈值上限
  16. Dnlimit float64 `gorm:"column:dnlimit" json:"dnlimit"` // 阈值下限
  17. Dio int32 `gorm:"column:dio" json:"dio"` // 开关量。0、1
  18. Diffvalue float64 `gorm:"column:diffvalue" json:"diffvalue"` // 差值
  19. Relation int32 `gorm:"column:relation" json:"relation"` // 多测点间告警关系。1-与,2-或,3-无
  20. CreateAt time.Time `gorm:"->" json:"create_at" c:"-"` // 创建时间
  21. UpdateAt time.Time `gorm:"->" json:"update_at" c:"-"` // 更新时间
  22. }
  23. // TableName AlarmRelation's table name
  24. func (*AlarmRelation) TableName() string {
  25. return TableNameAlarmRelation
  26. }