init
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package models
|
||||
|
||||
type Device struct {
|
||||
WWN string `json:"wwn" gorm:"primary_key"`
|
||||
|
||||
DeviceName string `json:"device_name"`
|
||||
Manufacturer string `json:"manufacturer"`
|
||||
ModelName string `json:"model_name"`
|
||||
InterfaceType string `json:"interface_type"`
|
||||
InterfaceSpeed string `json:"interface_speed"`
|
||||
SerialNumber string `json:"serial_name"`
|
||||
Capacity int64 `json:"capacity"`
|
||||
Firmware string `json:"firmware"`
|
||||
RotationSpeed int `json:"rotational_speed"`
|
||||
}
|
||||
|
||||
type DeviceRespWrapper struct {
|
||||
Success bool `json:"success"`
|
||||
Errors []error `json:"errors"`
|
||||
Data []Device `json:"data"`
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package models
|
||||
|
||||
//type SelfTest struct {
|
||||
// DeviceWWN string
|
||||
// Device Device `gorm:"foreignkey:DeviceWWN"` // use DeviceWWN as foreign key
|
||||
//
|
||||
// TestDate time.Time
|
||||
//}
|
||||
@@ -0,0 +1,14 @@
|
||||
package models
|
||||
|
||||
//type Smart struct {
|
||||
// DeviceWWN string
|
||||
// Device Device `gorm:"foreignkey:DeviceWWN"` // use DeviceWWN as foreign key
|
||||
//
|
||||
// TestDate time.Time
|
||||
//
|
||||
// Temp float32
|
||||
// PowerOnCount int64
|
||||
// PowerOnHours int64
|
||||
// SmartStatus string
|
||||
// SmartAttributes string
|
||||
//}
|
||||
Reference in New Issue
Block a user