12345678910111213141516171819202122232425262728293031323334 |
- // Code generated by gorm.io/gen. DO NOT EDIT.
- // Code generated by gorm.io/gen. DO NOT EDIT.
- // Code generated by gorm.io/gen. DO NOT EDIT.
- package model
- import (
- "time"
- )
- const TableNameAlarmEvent = "alarm_event"
- // AlarmEvent mapped from table <alarm_event>
- type AlarmEvent struct {
- ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` // 告警事件表
- Eventid int64 `gorm:"column:eventid;not null" json:"eventid,string"` // 事件ID,全局唯一
- Subeventid int64 `gorm:"column:subeventid" json:"subeventid,string"` // 测点告警时,对应的复归事件ID
- Eventdesc string `gorm:"column:eventdesc" json:"eventdesc"` // 告警事件描述
- Eventtype int32 `gorm:"column:eventtype" json:"eventtype"` // 事件类别。1-测点告警,2-系统告警,3-告警复归
- Timestamp int64 `gorm:"column:timestamp" json:"timestamp,string"` // 事件产生时的时间戳
- Strategyid int64 `gorm:"column:strategyid" json:"strategyid,string"` // 关联的告警策略ID,只用于测点告警
- Confirm int32 `gorm:"column:confirm;default:1" json:"confirm"` // 用户是否确认。1-未确认,2-已确认
- Confirmtime time.Time `gorm:"column:confirmtime" json:"confirmtime"` // 用户确认时间
- Result string `gorm:"column:result" json:"result"` // 用户处理结果
- Alarmlevel int32 `gorm:"column:alarmlevel" json:"alarmlevel"` // 告警等级
- Appid int32 `gorm:"column:appid" json:"appid"`
- CreateAt time.Time `gorm:"->" json:"create_at" c:"-"` // 创建时间
- UpdateAt time.Time `gorm:"->" json:"update_at" c:"-"` // 更新时间
- }
- // TableName AlarmEvent's table name
- func (*AlarmEvent) TableName() string {
- return TableNameAlarmEvent
- }
|