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.
22 lines
763 B
22 lines
763 B
package db
|
|
|
|
import "github.com/jinzhu/gorm"
|
|
|
|
type SmartScsiAttribute struct {
|
|
gorm.Model
|
|
|
|
SmartId int `json:"smart_id"`
|
|
Smart Device `json:"-" gorm:"foreignkey:SmartId"` // use SmartId as foreign key
|
|
|
|
AttributeId string `json:"attribute_id"` //json string from smartctl
|
|
Name string `json:"name"`
|
|
Value int `json:"value"`
|
|
Threshold int `json:"thresh"`
|
|
|
|
TransformedValue int64 `json:"transformed_value"`
|
|
Status string `gorm:"-" json:"status,omitempty"`
|
|
StatusReason string `gorm:"-" json:"status_reason,omitempty"`
|
|
FailureRate float64 `gorm:"-" json:"failure_rate,omitempty"`
|
|
History []SmartScsiAttribute `gorm:"-" json:"history,omitempty"`
|
|
}
|