ai_report.go 721 B

123456789101112131415161718
  1. package models
  2. import (
  3. "time"
  4. "github.com/google/uuid"
  5. )
  6. // AIAnalysisReport AI监控分析报表
  7. type AIAnalysisReport struct {
  8. ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"`
  9. ReportType string `gorm:"type:varchar(50)" json:"report_type"` // 例如: ALARM_ANALYSIS
  10. Title string `gorm:"type:varchar(200)" json:"title"`
  11. Content string `gorm:"type:text" json:"content"` // Markdown 格式的内容
  12. CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
  13. Status string `gorm:"type:varchar(20)" json:"status"` // GENERATING, COMPLETED, FAILED
  14. AlertCount int `gorm:"type:int" json:"alert_count"` // 触发时的告警数量
  15. }