package model import "gorm.io/gorm" type Illuminating struct { gorm.Model } type IlluminatingDevice struct { Id int `json:"Id"` DeviceName string `json:"DeviceName"` //设备名称 SwitchStatus int `json:"SwitchStatus"` //开工状态 OnlinePresence int `json:"OnlinePresence"` //在线状态 } type RunAnalyse struct { OpenCount int `json:"OpenCount"` //开启数量 OffCount int `json:"OffCount"` //关闭数量 FaultCount int `json:"FaultCount"` //故障数量 } type EventList struct { Id int `json:"Id"` DeviceName string `json:"DeviceName"` //设备名称 DeviceStatus int `json:"DeviceStatus"` //设备状态 EventDate string `json:"EventDate"` //事件时间 } func (m *Illuminating) TableName() string { return "illuminating" }