Files
web_ylsa/api_iris/model/sysinfo.go
2025-07-11 16:54:11 +08:00

56 lines
1.9 KiB
Go

package model
import "gorm.io/gorm"
type SysInfo struct {
Date string `json:"date" gorm:"index:select_info"`
Datetime string `json:"datetime" gorm:"index:datetime_index"`
Username string `json:"username" gorm:"index:select_info"`
Hostname string `json:"hostname"`
Ip string `json:"ip" gorm:"index:select_info"`
SysVersion string `json:"sysVersion"`
PhysicalCount int `json:"physicalCount"`
LogicalCount int `json:"logicalCount"`
CpuPer float64 `json:"cpuPer"`
MemTotal string `json:"memTotal"`
MemUsed string `json:"memUsed"`
MemPer float64 `json:"memPer"`
DiskPoint string `json:"diskPoint"`
DiskTotal string `json:"diskTotal"`
DiskUsed string `json:"diskUsed"`
DiskPer string `json:"diskPer"`
NetSent int64 `json:"netSent"`
NetRec int64 `json:"netRec"`
SentSpeed string `json:"sentSpeed"`
RecSpeed string `json:"recSpeed"`
gorm.Model
}
type SysInfoOld struct {
Datetime string `json:"datetime" gorm:"index:datetime_index"`
Username string `json:"username"`
Hostname string `json:"hostname"`
Ip string `json:"ip"`
SysVersion string `json:"sysVersion"`
PhysicalCount int `json:"physicalCount"`
LogicalCount int `json:"logicalCount"`
CpuPer float64 `json:"cpuPer"`
MemTotal string `json:"memTotal"`
MemUsed string `json:"memUsed"`
MemPer float64 `json:"memPer"`
DiskPoint string `json:"diskPoint"`
DiskTotal string `json:"diskTotal"`
DiskUsed string `json:"diskUsed"`
DiskPer string `json:"diskPer"`
NetSent int64 `json:"netSent"`
NetRec int64 `json:"netRec"`
SentSpeed string `json:"sentSpeed"`
RecSpeed string `json:"recSpeed"`
}
type SysInfoUpdateLog struct {
Datetime string `json:"datetime"`
Update bool `json:"update"`
gorm.Model
}