初始化项目文件
This commit is contained in:
55
api_iris/model/sysinfo.go
Normal file
55
api_iris/model/sysinfo.go
Normal file
@ -0,0 +1,55 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user