package com.bonus.canteen.core.account.v4.constant;


import com.bonus.canteen.core.common.converter.LeExcelFieldConvertor;
import com.bonus.canteen.core.common.converter.LeExcelFieldEnum;

import java.util.Arrays;
import java.util.List;

public enum CardStatusEnum implements LeExcelFieldEnum<CardStatusEnum> {
   NORMAL(1, "正常"),
   LOSS(4, "挂失"),
   APPLY(5, "发卡"),
   REFUND(6, "退卡"),
   EXPIRED(7, "已过期");

   private final Integer key;
   private final String desc;

   private CardStatusEnum(Integer key, String desc) {
      this.key = key;
      this.desc = desc;
   }

   public static String getDesc(Integer key) {
      CardStatusEnum[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         CardStatusEnum temp = var1[var3];
         if (temp.getKey().equals(key)) {
            return temp.getDesc();
         }
      }

      return "";
   }

   public static List<Integer> normalAndLoss() {
      return Arrays.asList(NORMAL.getKey(), LOSS.getKey());
   }

   @Override
   public Integer getKey() {
      return this.key;
   }

   @Override
   public String getDesc() {
      return this.desc;
   }

   // $FF: synthetic method
   private static CardStatusEnum[] $values() {
      return new CardStatusEnum[]{NORMAL, LOSS, APPLY, REFUND, EXPIRED};
   }

   public static class ExcelConvertor extends LeExcelFieldConvertor<CardStatusEnum> {
      public ExcelConvertor() {
         super(CardStatusEnum.class);
      }
   }
}
