illuminating.go 818 B

12345678910111213141516171819202122232425262728
  1. package model
  2. import "gorm.io/gorm"
  3. type Illuminating struct {
  4. gorm.Model
  5. }
  6. type IlluminatingDevice struct {
  7. Id int `json:"Id"`
  8. DeviceName string `json:"DeviceName"` //设备名称
  9. SwitchStatus int `json:"SwitchStatus"` //开工状态
  10. OnlinePresence int `json:"OnlinePresence"` //在线状态
  11. }
  12. type RunAnalyse struct {
  13. OpenCount int `json:"OpenCount"` //开启数量
  14. OffCount int `json:"OffCount"` //关闭数量
  15. FaultCount int `json:"FaultCount"` //故障数量
  16. }
  17. type EventList struct {
  18. Id int `json:"Id"`
  19. DeviceName string `json:"DeviceName"` //设备名称
  20. DeviceStatus int `json:"DeviceStatus"` //设备状态
  21. EventDate string `json:"EventDate"` //事件时间
  22. }
  23. func (m *Illuminating) TableName() string {
  24. return "illuminating"
  25. }