feat: 完善平台总后台模块

This commit is contained in:
2026-07-27 00:18:42 +08:00
parent 073eb89762
commit 642980960e
197 changed files with 22356 additions and 1060 deletions

View File

@@ -0,0 +1,18 @@
package models
import (
"git.apinb.com/bsm-sdk/core/database"
"time"
)
// DevTelemetry 对应 dev_telemetry保存设备遥测摘要。
type DevTelemetry struct {
Entity
SmartCylinderValveIdentity string `gorm:"column:smart_cylinder_valve_identity;type:varchar(36);not null;index" json:"smart_cylinder_valve_identity"`
ReportedAt time.Time `gorm:"column:reported_at;type:timestamptz;not null;index" json:"reported_at"`
Payload string `gorm:"column:payload;type:jsonb;not null;default:'{}'" json:"payload"`
QualityFlag string `gorm:"column:quality_flag;type:varchar(32);not null;default:'normal'" json:"quality_flag"`
}
func init() { database.AppendMigrate(&DevTelemetry{}) }
func (table *DevTelemetry) TableName() string { return "dev_telemetry" }