package com.bonus.canteen.core.allocation.constants;

public enum QRTypeEnum {
   LOCATION(1, "位置码"),
   TABLE(2, "餐桌码"),
   CANTEEN_COLLECTION(3, "食堂收款码"),
   STALL_COLLECTION(4, "档口收款码"),
   SUPERMARKET_COLLECTION(5, "商超收款码");

   private final Integer key;
   private final String value;

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

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

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

      return null;
   }

   public static QRTypeEnum getEnum(Integer key) {
      QRTypeEnum[] qrTypeEnums = values();
      QRTypeEnum[] var2 = qrTypeEnums;
      int var3 = qrTypeEnums.length;

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

      return null;
   }

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

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

      return null;
   }

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

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