feat: 修复 AI 风险语义并隔离 Mock 数据

This commit is contained in:
weijuesen
2026-08-14 01:16:50 +08:00
parent 839ba91354
commit 74d1948d68
29 changed files with 650 additions and 113 deletions
+3
View File
@@ -14,6 +14,9 @@ type InspectionRecord struct {
Detections json.RawMessage `gorm:"column:detections;type:jsonb" json:"detections,omitempty"`
RiskScore *float64 `gorm:"column:risk_score;type:float" json:"riskScore,omitempty"`
RiskLevel *string `gorm:"column:risk_level;size:16" json:"riskLevel,omitempty"`
RiskAssessment json.RawMessage `gorm:"column:risk_assessment;type:jsonb" json:"riskAssessment,omitempty"`
ModelVersion *string `gorm:"column:model_version;size:64" json:"modelVersion,omitempty"`
IsMock *bool `gorm:"column:is_mock;default:false" json:"isMock,omitempty"`
AIStatus string `gorm:"column:ai_status;size:16;default:done" json:"aiStatus"`
IdempotencyKey *string `gorm:"column:idempotency_key;size:128;uniqueIndex" json:"idempotencyKey,omitempty"`
CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"`