feat(platform): summarize vehicle source status

This commit is contained in:
lingniu
2026-07-03 21:47:30 +08:00
parent a3a91ef1f8
commit 6352289c25
5 changed files with 147 additions and 28 deletions

View File

@@ -42,13 +42,24 @@ type VehicleRow struct {
}
type VehicleDetail struct {
VIN string `json:"vin"`
Identity *VehicleRow `json:"identity,omitempty"`
Sources []string `json:"sources"`
Realtime []RealtimeLocationRow `json:"realtime"`
History Page[HistoryLocationRow] `json:"history"`
Raw Page[RawFrameRow] `json:"raw"`
Mileage Page[DailyMileageRow] `json:"mileage"`
VIN string `json:"vin"`
Identity *VehicleRow `json:"identity,omitempty"`
Sources []string `json:"sources"`
SourceStatus []VehicleSourceStatus `json:"sourceStatus"`
Realtime []RealtimeLocationRow `json:"realtime"`
History Page[HistoryLocationRow] `json:"history"`
Raw Page[RawFrameRow] `json:"raw"`
Mileage Page[DailyMileageRow] `json:"mileage"`
}
type VehicleSourceStatus struct {
Protocol string `json:"protocol"`
Online bool `json:"online"`
LastSeen string `json:"lastSeen"`
HasRealtime bool `json:"hasRealtime"`
HasHistory bool `json:"hasHistory"`
HasRaw bool `json:"hasRaw"`
HasMileage bool `json:"hasMileage"`
}
type RealtimeLocationRow struct {