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 TrapRule struct {
ID uint `gorm:"primaryKey" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Name string `gorm:"size:256" json:"name"`
Enabled bool `gorm:"default:true" json:"enabled"`
Priority int `gorm:"index" json:"priority"`
OIDPrefix string `gorm:"size:512" json:"oid_prefix"`
VarbindMatchRegex string `gorm:"size:512" json:"varbind_match_regex"`
AlertName string `gorm:"size:256" json:"alert_name"`
SeverityCode string `gorm:"size:32" json:"severity_code"`
PolicyID uint `json:"policy_id"`
}
func (TrapRule) TableName() string {
return "logs_trap_rules"
}