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

20 lines
906 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"
"time"
)
// SafEvent 对应 saf_event保存安全事件统一入口。
type SafEvent struct {
Entity
EventCode string `gorm:"column:event_code;type:varchar(64);not null;uniqueIndex" json:"event_code"`
Level int `gorm:"column:level;not null;default:3" json:"level"`
Title string `gorm:"column:title;type:varchar(256);not null;default:''" json:"title"`
SmartCylinderValveIdentity string `gorm:"column:smart_cylinder_valve_identity;type:varchar(36);not null;default:'';index" json:"smart_cylinder_valve_identity"`
SLAAt *time.Time `gorm:"column:sla_at;type:timestamptz" json:"sla_at"`
}
func init() { database.AppendMigrate(&SafEvent{}) }
func (table *SafEvent) TableName() string { return "saf_event" }