fix: 修复自定义指标创建时间异常存储错误

This commit is contained in:
TsMask
2025-09-17 16:53:05 +08:00
parent 3a3d4fb43b
commit 9d3eb2a289
3 changed files with 12 additions and 12 deletions

View File

@@ -4,7 +4,6 @@ import (
"database/sql/driver"
"encoding/json"
"fmt"
"time"
)
type KpiCVal struct {
@@ -26,7 +25,7 @@ type KpiCReport struct {
Index int16 `gorm:"column:index" json:"index"`
Granularity *int8 `gorm:"column:granularity;default:60" json:"granularity,omitempty"` //Time granualarity: 5/10/.../60/300 (second)
KpiValues KpiCValues `gorm:"column:kpi_values;type:json" json:"kpiValues,omitempty"`
CreatedAt *time.Time `gorm:"column:created_at;default:current_timestamp()" json:"createdAt,omitempty"`
CreatedAt int64 `gorm:"column:created_at" json:"createdAt,omitempty"`
TenantID *string `gorm:"column:tenant_id;default:NULL" json:"tenantID,omitempty"`
}