feat(operations): add source diagnosis workspace

This commit is contained in:
lingniu
2026-07-16 17:35:10 +08:00
parent df7d9799b3
commit 96cad7eef7
18 changed files with 881 additions and 10 deletions

View File

@@ -944,6 +944,7 @@ type VehicleLocationSourceEvidence struct {
SourceLabel string `json:"sourceLabel"`
TerminalLabel string `json:"terminalLabel"`
SourceKind string `json:"sourceKind"`
SourceRef string `json:"sourceRef,omitempty"`
SelectedWithinProtocol bool `json:"selectedWithinProtocol"`
Recommended bool `json:"recommended"`
Enabled bool `json:"enabled"`
@@ -958,6 +959,10 @@ type VehicleLocationSourceEvidence struct {
SOCPercent *float64 `json:"socPercent,omitempty"`
EventTime string `json:"eventTime"`
ReceivedAt string `json:"receivedAt"`
FirstSeenAt string `json:"firstSeenAt,omitempty"`
ReportIntervalSec *int `json:"reportIntervalSec,omitempty"`
ReportSampleCount int64 `json:"reportSampleCount,omitempty"`
SelectionReason string `json:"selectionReason,omitempty"`
sourceKey string
}
@@ -988,6 +993,60 @@ type VehicleSourceEvidenceComparison struct {
ReportTimeDeltaSeconds float64 `json:"reportTimeDeltaSeconds"`
}
type VehicleSourceDiagnostic struct {
Evidence VehicleSourceEvidence `json:"evidence"`
Access *AccessVehicleRow `json:"access,omitempty"`
Policy VehicleSourcePolicyConfig `json:"policy"`
RecommendationReason string `json:"recommendationReason"`
RefreshHint string `json:"refreshHint"`
}
type VehicleSourcePolicyConfig struct {
VIN string `json:"vin"`
Version int `json:"version"`
UpdatedBy string `json:"updatedBy"`
UpdatedAt string `json:"updatedAt"`
Audit []VehicleSourcePolicyAudit `json:"audit"`
}
type VehicleSourcePolicyAudit struct {
Version int `json:"version"`
Protocol string `json:"protocol"`
SourceRef string `json:"sourceRef"`
SourceLabel string `json:"sourceLabel"`
Actor string `json:"actor"`
ChangedAt string `json:"changedAt"`
Summary string `json:"summary"`
}
type VehicleSourcePolicyUpdate struct {
Version int `json:"version"`
SourceRef string `json:"sourceRef"`
Enabled bool `json:"enabled"`
Priority int `json:"priority"`
Remark string `json:"remark"`
Actor string `json:"actor"`
}
type vehicleSourcePolicyStoreUpdate struct {
VehicleSourcePolicyUpdate
VIN string
Protocol string
SourceKey string
SourceLabel string
CurrentEnabled bool
CurrentPriority int
CurrentRemark string
}
type vehicleLocationSourceHistory struct {
Protocol string
sourceKey string
FirstSeenAt string
LastSeenAt string
ReportSampleCount int64
}
type VehicleServiceOverview struct {
VIN string `json:"vin"`
Plate string `json:"plate"`