|
|
@@ -0,0 +1,68 @@
|
|
|
+package com.zhongshu.iot.client.openApi.model;
|
|
|
+
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
+import com.github.microservice.models.type.OnLineState;
|
|
|
+import com.zhongshu.iot.client.model.iot.IotTemplateModel;
|
|
|
+import com.zhongshu.iot.client.model.mqtt.ProjectInfoModel;
|
|
|
+import com.zhongshu.iot.client.openApi.base.SuperAPIModel;
|
|
|
+import com.zhongshu.iot.client.type.DataState;
|
|
|
+import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author TRX
|
|
|
+ * @date 2024/11/11
|
|
|
+ */
|
|
|
+@Data
|
|
|
+@AllArgsConstructor
|
|
|
+@NoArgsConstructor
|
|
|
+public class DeviceInfoOpenAPIModel extends SuperAPIModel {
|
|
|
+
|
|
|
+ @Schema(description = "设备ID")
|
|
|
+ private String deviceId;
|
|
|
+
|
|
|
+ @Schema(description = "设备名称")
|
|
|
+ private String deviceName;
|
|
|
+
|
|
|
+ @Schema(description = "在线状态")
|
|
|
+ private OnLineState onLineState;
|
|
|
+
|
|
|
+ private String onLineStateStr;
|
|
|
+
|
|
|
+ public String getOnLineStateStr() {
|
|
|
+ if (onLineState != null) {
|
|
|
+ return onLineState.getRemark();
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ @Schema(description = "数据状态")
|
|
|
+ private DataState state;
|
|
|
+
|
|
|
+ private String stateStr;
|
|
|
+
|
|
|
+ public String getStateStr() {
|
|
|
+ if (state != null) {
|
|
|
+ return state.getRemark();
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ @Schema(description = "ip地址")
|
|
|
+ private String ip;
|
|
|
+
|
|
|
+ @Schema(description = "激活时间")
|
|
|
+ private Long activityTime;
|
|
|
+
|
|
|
+ @Schema(description = "最后上线时间")
|
|
|
+ private Long lastOnlineTime;
|
|
|
+
|
|
|
+ @Schema(description = "项目code")
|
|
|
+ private String projectInfoCode;
|
|
|
+
|
|
|
+ @Schema(description = "最后离线时间")
|
|
|
+ private Long lastOffLineTime;
|
|
|
+
|
|
|
+}
|