fix: close platform admin final audit findings

This commit is contained in:
2026-07-27 12:02:08 +08:00
parent 0ba4136e1a
commit 34e8b092b3
70 changed files with 1873 additions and 348 deletions

View File

@@ -7,12 +7,12 @@ import (
// ReportMetricSnapshot 对应 report_metric_snapshot保存指标快照。
type ReportMetricSnapshot struct {
Entity
MetricCode string `gorm:"column:metric_code;type:varchar(64);not null;index" json:"metric_code"`
ScopeType string `gorm:"column:scope_type;type:varchar(32);not null" json:"scope_type"`
ScopeID uint64 `gorm:"column:scope_id;not null;default:0;index" json:"scope_id"`
StatAt time.Time `gorm:"column:stat_at;type:timestamptz;not null;index" json:"stat_at"`
MetricValue string `gorm:"column:metric_value;type:varchar(128);not null" json:"metric_value"`
Entity // 公共实体字段
MetricCode string `gorm:"column:metric_code;type:varchar(64);not null;index" json:"metric_code"` // metric_code 业务字段
ScopeType string `gorm:"column:scope_type;type:varchar(32);not null" json:"scope_type"` // scope_type 业务字段
ScopeID uint64 `gorm:"column:scope_id;not null;default:0;index" json:"scope_id"` // scope_id 业务字段
StatAt time.Time `gorm:"column:stat_at;type:timestamptz;not null;index" json:"stat_at"` // stat_at 业务字段
MetricValue string `gorm:"column:metric_value;type:varchar(128);not null" json:"metric_value"` // metric_value 业务字段
}
func init() { database.AppendMigrate(&ReportMetricSnapshot{}) }