package com.iailab.module.data.point.common; import lombok.AllArgsConstructor; import lombok.Getter; /** * @author PanZhibao * @Description * @createTime 2023年12月06日 13:05:00 */ @Getter @AllArgsConstructor public enum PointDataTypeEnum { INT("int", "整型"), FLOAT("float", "浮点型"), BOOLEAN("boolean", "布尔型"); private String code; private String desc; public static PointDataTypeEnum getEumByCode(String code) { if (code == null) { return null; } for (PointDataTypeEnum statusEnum : PointDataTypeEnum.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } }