1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
| package cn.iocoder.yudao.module.iot.enums.thingmodel;
|
| import cn.iocoder.yudao.framework.common.core.ArrayValuable;
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| import java.util.Arrays;
|
| /**
| * IoT 数据定义的数据类型枚举类
| *
| * @author 芋道源码
| */
| @AllArgsConstructor
| @Getter
| public enum IotDataSpecsDataTypeEnum implements ArrayValuable<String> {
|
| INT("int"),
| FLOAT("float"),
| DOUBLE("double"),
| ENUM("enum"),
| BOOL("bool"),
| TEXT("text"),
| DATE("date"),
| STRUCT("struct"),
| ARRAY("array");
|
| public static final String[] ARRAYS = Arrays.stream(values()).map(IotDataSpecsDataTypeEnum::getDataType).toArray(String[]::new);
|
| private final String dataType;
|
| @Override
| public String[] array() {
| return ARRAYS;
| }
|
| }
|
|