package com.bonus.core.supermarket.constant;

public enum AppSaleModeEnum {
   GOODS_IN_STOCK(1, "现货"),
   RESERVE(2, "预定");

   private final Integer key;
   private final String value;

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

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

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

      return null;
   }

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

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

      return null;
   }

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

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

}
