package model import "time" // Alarm 实时告警上报信息 type Alarm struct { ID int64 `json:"id" gorm:"id"` AlarmSeq int64 `json:"alarm_seq" gorm:"alarm_seq"` AlarmId string `json:"alarm_id" gorm:"alarm_id"` AlarmTitle string `json:"alarm_title" gorm:"alarm_title"` NeType string `json:"ne_type" gorm:"ne_type"` NeId string `json:"ne_id" gorm:"ne_id"` AlarmCode int64 `json:"alarm_code" gorm:"alarm_code"` EventTime time.Time `json:"event_time" gorm:"event_time"` AlarmType string `json:"alarm_type" gorm:"alarm_type"` OrigSeverity string `json:"orig_severity" gorm:"orig_severity"` // 1: Critical, 2: Major, 3: Minor, 4: Warning, 5: Event(Only VNF) PerceivedSeverity string `json:"perceived_severity" gorm:"perceived_severity"` // 1: Critical, 2: Major, 3: Minor, 4: Warning, 5: Event(Only VNF) PvFlag string `json:"pv_flag" gorm:"pv_flag"` NeName string `json:"ne_name" gorm:"ne_name"` ObjectUid string `json:"object_uid" gorm:"object_uid"` ObjectName string `json:"object_name" gorm:"object_name"` ObjectType string `json:"object_type" gorm:"object_type"` LocationInfo string `json:"location_info" gorm:"location_info"` Province string `json:"province" gorm:"province"` AlarmStatus int64 `json:"alarm_status" gorm:"alarm_status"` SpecificProblem string `json:"specific_problem" gorm:"specific_problem"` SpecificProblemId string `json:"specific_problem_id" gorm:"specific_problem_id"` AddInfo string `json:"add_info" gorm:"add_info"` Counter int64 `json:"counter" gorm:"counter"` LatestEventTime time.Time `json:"latest_event_time" gorm:"latest_event_time"` AckState int8 `json:"ack_state" gorm:"ack_state"` // 0: Unacked, 1: Acked AckTime time.Time `json:"ack_time" gorm:"ack_time"` AckUser string `json:"ack_user" gorm:"ack_user"` ClearType int8 `json:"clear_type" gorm:"clear_type"` // 0: Unclear, 1: AutoClear, 2: ManualClear ClearTime time.Time `json:"clear_time" gorm:"clear_time"` ClearUser string `json:"clear_user" gorm:"clear_user"` Timestamp time.Time `json:"timestamp" gorm:"timestamp"` } // TableName 表名称 func (*Alarm) TableName() string { return "alarm" }