22 lines
804 B
Go
22 lines
804 B
Go
|
|
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"
|
||
|
|
}
|