package com.bonus.canteen.core.report.statistics.constants;

public enum ReportSumTypeEnum {
   PRE_TIME_RANGE(1, "按时段汇总"),
   PRE_TIME_DAY(2, "按日期汇总");

   private final Integer key;
   private final String value;

   private ReportSumTypeEnum(Integer key, String value) {
      this.key = key;
      this.value = value;
   }

   public static Integer getKey(String value) {
      ReportSumTypeEnum[] reportSumTypeEnums = values();
      ReportSumTypeEnum[] var2 = reportSumTypeEnums;
      int var3 = reportSumTypeEnums.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         ReportSumTypeEnum reportSumTypeEnum = var2[var4];
         if (reportSumTypeEnum.value().equals(value)) {
            return reportSumTypeEnum.key();
         }
      }

      return null;
   }

   public static String getValue(Integer key) {
      ReportSumTypeEnum[] reportSumTypeEnums = values();
      ReportSumTypeEnum[] var2 = reportSumTypeEnums;
      int var3 = reportSumTypeEnums.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         ReportSumTypeEnum reportSumTypeEnum = var2[var4];
         if (reportSumTypeEnum.key().equals(key)) {
            return reportSumTypeEnum.value();
         }
      }

      return null;
   }

   public Integer key() {
      return this.key;
   }

   public String value() {
      return this.value;
   }

}
