This commit is contained in:
zxr
2026-03-30 15:26:16 +08:00
parent 5939a3d62d
commit 279021bf86
25 changed files with 1794 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
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"
}