package com.ots.common.enums; import lombok.Getter; import java.util.Objects; @Getter public enum ReportTypeEnum { Brief("Brief", "简易版"), Complete("Complete", "完整版"), SAQ("SAQ", "SAQ报告"), RuiLin("RuiLin", "睿邻报告"), CAQ("CAQ", "CAQ报告"), JAQ("JAQ","JAQ报告"),MAQ("MAQ", "MAQ报告"); private final String code; private final String message; ReportTypeEnum(String code, String message) { this.code = code; this.message = message; } public static ReportTypeEnum codeOf(String code) { for (ReportTypeEnum xxxEnum : values()) { if (Objects.equals(xxxEnum.getCode(), code)) { return xxxEnum; } } throw new RuntimeException("The Report is not supported!"); } }