|
|
@@ -0,0 +1,70 @@
|
|
|
+package com.zhongshu.iot.client.model.device;
|
|
|
+
|
|
|
+import com.github.microservice.busInfoModel.device.DeviceInfoSimpleModel;
|
|
|
+import com.github.microservice.models.baseParam.SuperModel;
|
|
|
+import com.github.microservice.types.FunctionType;
|
|
|
+import com.github.microservice.types.deviceUse.IotDeviceDataType;
|
|
|
+import com.zhongshu.iot.client.model.iot.IotMainSimpleModel;
|
|
|
+import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author TRX
|
|
|
+ * @date 2024/7/16
|
|
|
+ */
|
|
|
+@Data
|
|
|
+@AllArgsConstructor
|
|
|
+@NoArgsConstructor
|
|
|
+public class IotDeviceDataModel extends SuperModel {
|
|
|
+
|
|
|
+ @Schema(description = "关联的属性、事件、方法")
|
|
|
+ private IotMainSimpleModel iotMain;
|
|
|
+
|
|
|
+ @Schema(description = "所属模版ID")
|
|
|
+ private String iotTemplateId;
|
|
|
+
|
|
|
+ @Schema(description = "关联物模型信息")
|
|
|
+ private String iotThingId;
|
|
|
+
|
|
|
+ @Schema(description = "设备信息")
|
|
|
+ private DeviceInfoSimpleModel deviceInfo;
|
|
|
+
|
|
|
+ @Schema(description = "关联的设备")
|
|
|
+ private String deviceId;
|
|
|
+
|
|
|
+ @Schema(description = "功能类型,属性 事件 服务")
|
|
|
+ private FunctionType functionType;
|
|
|
+
|
|
|
+ @Schema(description = "功能名称")
|
|
|
+ private String iotName;
|
|
|
+
|
|
|
+ @Schema(description = "标识符")
|
|
|
+ private String identifier;
|
|
|
+
|
|
|
+ @Schema(description = "所属分组code")
|
|
|
+ private String projectCode;
|
|
|
+
|
|
|
+ @Schema(description = "属性名称,如:name、age、temperature")
|
|
|
+ private String property;
|
|
|
+
|
|
|
+ @Schema(description = "对应的值")
|
|
|
+ private Object value;
|
|
|
+
|
|
|
+ @Schema(description = "数据类型,如:当前数据,历史数据")
|
|
|
+ private IotDeviceDataType dataType = IotDeviceDataType.Current;
|
|
|
+
|
|
|
+ private String dataTypeStr;
|
|
|
+
|
|
|
+ public String getDataTypeStr() {
|
|
|
+ if (dataType != null) {
|
|
|
+ return dataType.getRemark();
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ @Schema(description = "整个推送的值")
|
|
|
+ private Object mqttParam;
|
|
|
+
|
|
|
+}
|