|
|
@@ -1,10 +1,9 @@
|
|
|
package com.zswl.dataservice.domain.iot;
|
|
|
|
|
|
import com.zswl.dataservice.domain.base.SuperEntity;
|
|
|
-import com.zswl.dataservice.type.DataType;
|
|
|
-import com.zswl.dataservice.type.FunctionType;
|
|
|
-import com.zswl.dataservice.type.MainUnitType;
|
|
|
-import com.zswl.dataservice.type.OperationType;
|
|
|
+import com.zswl.dataservice.model.iot.IotAttribute;
|
|
|
+import com.zswl.dataservice.model.iot.IotDict;
|
|
|
+import com.zswl.dataservice.type.*;
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
@@ -13,7 +12,7 @@ import org.springframework.data.mongodb.core.mapping.DBRef;
|
|
|
import org.springframework.data.mongodb.core.mapping.Document;
|
|
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 物模型
|
|
|
@@ -27,31 +26,58 @@ import java.util.Map;
|
|
|
@AllArgsConstructor
|
|
|
public class IotMain extends SuperEntity {
|
|
|
|
|
|
+ // ------------------------iotMain 基础字段 start-----------------------
|
|
|
@Schema(description = "功能名称")
|
|
|
private String name;
|
|
|
|
|
|
- @Schema(description = "功能类型")
|
|
|
- FunctionType functionType;
|
|
|
-
|
|
|
@Schema(description = "标识符")
|
|
|
private String identifier;
|
|
|
|
|
|
- @Schema(description = "数据类型")
|
|
|
- private DataType dataType;
|
|
|
-
|
|
|
- @Schema(description = "数据定义")
|
|
|
- private LinkedHashMap<String, Object> data;
|
|
|
+ @Schema(description = "功能类型,属性 事件 服务")
|
|
|
+ FunctionType functionType;
|
|
|
|
|
|
@Schema(description = "物模型Topic")
|
|
|
private String iotTopic;
|
|
|
|
|
|
- @Schema(description = "设备操作权限")
|
|
|
- private OperationType operationType;
|
|
|
+ @Schema(description = "真实的topic")
|
|
|
+ private String realIotTopic;
|
|
|
|
|
|
@Schema(description = "所属模版")
|
|
|
@DBRef(lazy = true)
|
|
|
IotTemplate iotTemplate;
|
|
|
|
|
|
- @Schema(description = "单位")
|
|
|
- private MainUnitType mainUnitType;
|
|
|
+ //---------------------------------属性类型的 字段 start ------------------
|
|
|
+ @Schema(description = "数据类型,number、Boolean、String 等")
|
|
|
+ private DataType dataType;
|
|
|
+
|
|
|
+ @Schema(description = "单位名称,如:千克、流明、立方米等...")
|
|
|
+ private String unitName;
|
|
|
+
|
|
|
+ @Schema(description = "步长")
|
|
|
+ private Integer stepNumber;
|
|
|
+
|
|
|
+ @Schema(description = "最大的长度,如:类型为字符串时使用")
|
|
|
+ private String maxLength;
|
|
|
+
|
|
|
+ @Schema(description = "属性,参数列表,输入参数")
|
|
|
+ private List<IotAttribute> attributes;
|
|
|
+
|
|
|
+ @Schema(description = "值的对应,如:0-开")
|
|
|
+ private List<IotDict> values;
|
|
|
+
|
|
|
+ //--------------------------------关联设备时特有的属性 start------------------
|
|
|
+ @Schema(description = "区分是模版还是设备关联的物模型")
|
|
|
+ private IotDataType iotDataType;
|
|
|
+
|
|
|
+ @Schema(description = "关联的设备")
|
|
|
+ private String deviceId;
|
|
|
+
|
|
|
+ @Schema(description = "所属分支code")
|
|
|
+ private String projectCode;
|
|
|
+
|
|
|
+ @Schema(description = "关联时间")
|
|
|
+ private Long addTime;
|
|
|
+
|
|
|
+ @Schema(description = "业务处理地址")
|
|
|
+ private String remoteUrl;
|
|
|
}
|