alarm_event.gen.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334
  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 TableNameAlarmEvent = "alarm_event"
  9. // AlarmEvent mapped from table <alarm_event>
  10. type AlarmEvent struct {
  11. ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` // 告警事件表
  12. Eventid int64 `gorm:"column:eventid;not null" json:"eventid,string"` // 事件ID,全局唯一
  13. Subeventid int64 `gorm:"column:subeventid" json:"subeventid,string"` // 测点告警时,对应的复归事件ID
  14. Eventdesc string `gorm:"column:eventdesc" json:"eventdesc"` // 告警事件描述
  15. Eventtype int32 `gorm:"column:eventtype" json:"eventtype"` // 事件类别。1-测点告警,2-系统告警,3-告警复归
  16. Timestamp int64 `gorm:"column:timestamp" json:"timestamp,string"` // 事件产生时的时间戳
  17. Strategyid int64 `gorm:"column:strategyid" json:"strategyid,string"` // 关联的告警策略ID,只用于测点告警
  18. Confirm int32 `gorm:"column:confirm;default:1" json:"confirm"` // 用户是否确认。1-未确认,2-已确认
  19. Confirmtime time.Time `gorm:"column:confirmtime" json:"confirmtime"` // 用户确认时间
  20. Result string `gorm:"column:result" json:"result"` // 用户处理结果
  21. Alarmlevel int32 `gorm:"column:alarmlevel" json:"alarmlevel"` // 告警等级
  22. Appid int32 `gorm:"column:appid" json:"appid"`
  23. CreateAt time.Time `gorm:"->" json:"create_at" c:"-"` // 创建时间
  24. UpdateAt time.Time `gorm:"->" json:"update_at" c:"-"` // 更新时间
  25. }
  26. // TableName AlarmEvent's table name
  27. func (*AlarmEvent) TableName() string {
  28. return TableNameAlarmEvent
  29. }