【feat】首页面板数据

This commit is contained in:
XM-GO
2023-09-23 16:55:24 +08:00
parent 79314f6f7e
commit d3a7deb66f
10 changed files with 393 additions and 2 deletions

View File

@@ -50,3 +50,18 @@ func (DeviceCmdLog) TableName() string {
type DeviceStatistics struct {
Time time.Time `gorm:"comment:时间" json:"time"`
}
type DeviceCount struct {
Total int64 `json:"total"`
Today int64 `json:"todayAdd"`
}
type DeviceCountLinkStatus struct {
Total int64 `json:"deviceTotal"`
LinkStatus string `json:"linkStatus"`
}
type DeviceCountType struct {
Total int64 `json:"deviceTotal"`
DeviceType string `json:"deviceType"`
}

View File

@@ -1,5 +1,13 @@
package entity
type DeviceTotalOutput struct {
DeviceInfo DeviceCount `json:"deviceInfo"`
DeviceLinkStatusInfo []DeviceCountLinkStatus `json:"deviceLinkStatusInfo"`
DeviceCountType []DeviceCountType `json:"deviceCountType"`
ProductInfo DeviceCount `json:"productInfo"`
AlarmInfo DeviceCount `json:"alarmInfo"`
}
type DeviceStatusVo struct {
Name string `json:"name"`
Key string `json:"key"`