package models import ( "fwh-toolbox-server/database" "time" "gorm.io/datatypes" ) var db = database.PgSQL type SiteAlarmSnapshotModel struct { ID int64 `gorm:"primaryKey"` // 使用雪花ID算法 SN string `gorm:"size:64;not null;uniqueIndex:idx_type_sn_time"` PackageID uint64 `gorm:"not null"` LogTime time.Time `gorm:"type:timestamp;not null;uniqueIndex:idx_type_sn_time"` // TIMESTAMP WITHOUT TIME ZONE JsonData datatypes.JSON `gorm:"type:jsonb"` }