|
|
@@ -13,7 +13,9 @@ import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
import org.springframework.data.mongodb.core.mapping.DBRef;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.LinkedHashMap;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* @author TRX
|
|
|
@@ -23,12 +25,25 @@ import java.util.LinkedHashMap;
|
|
|
@AllArgsConstructor
|
|
|
@NoArgsConstructor
|
|
|
public class IotMainModel extends SuperModel {
|
|
|
+
|
|
|
@Schema(description = "功能名称")
|
|
|
private String name;
|
|
|
|
|
|
- @Schema(description = "功能类型")
|
|
|
+ @Schema(description = "标识符")
|
|
|
+ private String identifier;
|
|
|
+
|
|
|
+ @Schema(description = "功能类型,属性 事件 服务")
|
|
|
FunctionType functionType;
|
|
|
|
|
|
+ @Schema(description = "物模型Topic")
|
|
|
+ private String iotTopic;
|
|
|
+
|
|
|
+ @Schema(description = "真实的topic")
|
|
|
+ private String realIotTopic;
|
|
|
+
|
|
|
+ @Schema(description = "是否返回数据")
|
|
|
+ private Boolean isReturnData = Boolean.TRUE;
|
|
|
+
|
|
|
private String functionTypeStr;
|
|
|
|
|
|
public String getFunctionTypeStr() {
|
|
|
@@ -38,27 +53,6 @@ public class IotMainModel extends SuperModel {
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
- @Schema(description = "标识符")
|
|
|
- private String identifier;
|
|
|
-
|
|
|
- @Schema(description = "数据类型")
|
|
|
- private DataType dataType;
|
|
|
-
|
|
|
- private String dataTypeStr;
|
|
|
-
|
|
|
- public String getDataTypeStr() {
|
|
|
- if (dataType != null) {
|
|
|
- return dataType.getRemark();
|
|
|
- }
|
|
|
- return "";
|
|
|
- }
|
|
|
-
|
|
|
- @Schema(description = "数据定义")
|
|
|
- private LinkedHashMap<String, Object> data;
|
|
|
-
|
|
|
- @Schema(description = "物模型Topic")
|
|
|
- private String iotTopic;
|
|
|
-
|
|
|
@Schema(description = "所属模版")
|
|
|
IotTemplateModel iotTemplate;
|
|
|
|
|
|
@@ -74,15 +68,37 @@ public class IotMainModel extends SuperModel {
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
- @Schema(description = "单位")
|
|
|
- private MainUnitType mainUnitType;
|
|
|
+ //---------------------------------属性类型的 字段 start ------------------
|
|
|
+ @Schema(description = "数据类型,number、Boolean、String 等")
|
|
|
+ private DataType dataType;
|
|
|
|
|
|
- private String mainUnitTypeStr;
|
|
|
+ private String dataTypeStr;
|
|
|
|
|
|
- public String getMainUnitTypeStr() {
|
|
|
- if (mainUnitType != null) {
|
|
|
- return mainUnitType.getRemark();
|
|
|
+ public String getDataTypeStr() {
|
|
|
+ if (dataType != null) {
|
|
|
+ return dataType.getRemark();
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
+
|
|
|
+ @Schema(description = "单位名称,如:千克、流明、立方米等...")
|
|
|
+ private String unitName;
|
|
|
+
|
|
|
+ @Schema(description = "步长")
|
|
|
+ private BigDecimal stepNumber;
|
|
|
+
|
|
|
+ @Schema(description = "最大的长度,如:类型为字符串时使用")
|
|
|
+ private String maxLength;
|
|
|
+
|
|
|
+ @Schema(description = "属性,参数列表,输入参数")
|
|
|
+ private List<IotAttribute> attributes;
|
|
|
+
|
|
|
+ @Schema(description = "值的对应,如:0-开")
|
|
|
+ private List<IotDict> values;
|
|
|
+
|
|
|
+ //--------------------------------关联设备时特有的属性 start------------------
|
|
|
+
|
|
|
+ @Schema(description = "业务处理地址")
|
|
|
+ private String remoteUrl;
|
|
|
+
|
|
|
}
|