22 lines
854 B
Go
22 lines
854 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type LogEvent struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
SourceKind string `gorm:"size:16;index" json:"source_kind"`
|
|
RemoteAddr string `gorm:"size:64" json:"remote_addr"`
|
|
RawPayload string `gorm:"type:text" json:"raw_payload"`
|
|
NormalizedSummary string `gorm:"type:text" json:"normalized_summary"`
|
|
NormalizedDetail string `gorm:"type:text" json:"normalized_detail"`
|
|
DeviceName string `gorm:"size:512;index" json:"device_name"`
|
|
SeverityCode string `gorm:"size:32" json:"severity_code"`
|
|
TrapOID string `gorm:"size:512;index" json:"trap_oid"`
|
|
AlertSent bool `json:"alert_sent"`
|
|
}
|
|
|
|
func (LogEvent) TableName() string {
|
|
return "logs_events"
|
|
}
|