package com.iailab.module.model.mcs.pre.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** * 预测粒度 * * @author PanZhibao * @Description * @createTime 2024年11月11日 */ @Getter @AllArgsConstructor public enum PredGranularityEnum { MIN1(60, "1min"); private Integer code; private String desc; public static PredGranularityEnum getEumByCode(Integer code) { if (code == null) { return null; } for (PredGranularityEnum statusEnum : PredGranularityEnum.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } }