2026-07-27 00:18:42 +08:00
|
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
|
|
import "git.apinb.com/bsm-sdk/core/database"
|
|
|
|
|
|
|
|
|
|
|
|
// ReportItem 对应 report_item,保存报表维度明细。
|
|
|
|
|
|
type ReportItem struct {
|
2026-07-27 12:02:08 +08:00
|
|
|
|
Entity // 公共实体字段
|
|
|
|
|
|
ReportID uint64 `gorm:"column:report_id;not null;index" json:"report_id"` // report_id 业务字段
|
|
|
|
|
|
Dimension string `gorm:"column:dimension;type:varchar(128);not null" json:"dimension"` // dimension 业务字段
|
|
|
|
|
|
MetricCode string `gorm:"column:metric_code;type:varchar(64);not null" json:"metric_code"` // metric_code 业务字段
|
|
|
|
|
|
MetricValue string `gorm:"column:metric_value;type:varchar(128);not null" json:"metric_value"` // metric_value 业务字段
|
2026-07-27 00:18:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func init() { database.AppendMigrate(&ReportItem{}) }
|
|
|
|
|
|
func (table *ReportItem) TableName() string { return "report_item" }
|