Files
platforms/backend/api/internal/models/saf_event.go

19 lines
737 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package models
import "git.apinb.com/bsm-sdk/core/database"
// SafEvent 对应 saf_event表示需要平台跟踪处置的安全事件。
type SafEvent struct {
Entity
EventCode string `gorm:"column:event_code;type:varchar(32);uniqueIndex;not null" json:"event_code"` // 安全事件编码
Level int `gorm:"column:level;type:integer;not null" json:"level"` // 风险等级1 至 3 级
Title string `gorm:"column:title;type:varchar(256);not null" json:"title"` // 事件说明
}
func init() {
database.AppendMigrate(&SafEvent{})
}
// TableName 返回与模型、文件名一致的单数数据表名。
func (table *SafEvent) TableName() string { return "saf_event" }