提交 | 用户 | 时间
|
a6de49
|
1 |
package com.iailab.module.data.point.common; |
H |
2 |
|
|
3 |
import lombok.AllArgsConstructor; |
|
4 |
import lombok.Getter; |
|
5 |
|
|
6 |
/** |
|
7 |
* @author PanZhibao |
|
8 |
* @Description |
|
9 |
* @createTime 2024年05月12日 |
|
10 |
*/ |
|
11 |
@Getter |
|
12 |
@AllArgsConstructor |
|
13 |
public enum StoreTypeEnum { |
|
14 |
|
|
15 |
RELATION("relation", "关系库"), |
|
16 |
INFLUXDB("influxdb", "时序库"); |
|
17 |
|
|
18 |
private String code; |
|
19 |
private String desc; |
|
20 |
|
|
21 |
public static PointDataTypeEnum getEumByCode(String code) { |
|
22 |
if (code == null) { |
|
23 |
return null; |
|
24 |
} |
|
25 |
|
|
26 |
for (PointDataTypeEnum statusEnum : PointDataTypeEnum.values()) { |
|
27 |
if (statusEnum.getCode().equals(code)) { |
|
28 |
return statusEnum; |
|
29 |
} |
|
30 |
} |
|
31 |
return null; |
|
32 |
} |
|
33 |
} |