You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scrutiny/webapp/backend/pkg/models/device_summary.go

28 lines
733 B

package models
import (
"github.com/analogj/scrutiny/webapp/backend/pkg/models/measurements"
"time"
)
type DeviceSummaryWrapper struct {
Success bool `json:"success"`
Errors []error `json:"errors"`
Data struct {
Summary map[string]*DeviceSummary `json:"summary"`
} `json:"data"`
}
type DeviceSummary struct {
Device Device `json:"device"`
SmartResults *SmartSummary `json:"smart,omitempty"`
TempHistory []measurements.SmartTemperature `json:"temp_history,omitempty"`
}
type SmartSummary struct {
// Collector Summary Data
CollectorDate time.Time `json:"collector_date,omitempty"`
Temp int64 `json:"temp,omitempty"`
PowerOnHours int64 `json:"power_on_hours,omitempty"`
}