TRX před 1 rokem
rodič
revize
56e4d746e6

+ 22 - 0
src/main/java/com/zswl/dataservice/domain/iot/DeviceIotMain.java

@@ -0,0 +1,22 @@
+package com.zswl.dataservice.domain.iot;
+
+import com.zswl.dataservice.domain.base.SuperEntity;
+import com.zswl.dataservice.domain.mqtt.DeviceInfo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import org.springframework.data.mongodb.core.mapping.DBRef;
+
+/**
+ * 设备对应的
+ *
+ * @author TRX
+ * @date 2024/7/9
+ */
+public class DeviceIotMain extends SuperEntity {
+
+    @Schema(description = "设备ID")
+    private String deviceId;
+
+    @Schema(description = "设备信息")
+    @DBRef(lazy = true)
+    private DeviceInfo deviceInfo;
+}

+ 25 - 0
src/main/java/com/zswl/dataservice/domain/iot/DeviceIotTemplate.java

@@ -0,0 +1,25 @@
+package com.zswl.dataservice.domain.iot;
+
+import com.zswl.dataservice.domain.base.SuperEntity;
+import com.zswl.dataservice.domain.mqtt.DeviceInfo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import org.springframework.data.mongodb.core.mapping.DBRef;
+
+/**
+ * @author TRX
+ * @date 2024/7/9
+ */
+@Data
+public class DeviceIotTemplate extends SuperEntity {
+    @Schema(description = "设备ID")
+    private String deviceId;
+
+    @Schema(description = "设备信息")
+    @DBRef(lazy = true)
+    private DeviceInfo deviceInfo;
+
+    @Schema(description = "模版信息")
+    @DBRef(lazy = true)
+    private IotTemplate iotTemplate;
+}

+ 4 - 0
src/main/java/com/zswl/dataservice/domain/iot/package-info.java

@@ -0,0 +1,4 @@
+package com.zswl.dataservice.domain.iot;
+/**
+ * 物模型相关的
+ */