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

public enum AccTradeStateEnum {
   CREATE(1, "待生效"),
   TAKE_EFFECT(2, "生效"),
   CANCELED(3, "已撤销"),
   CLOSE(4, "关闭");

   private final Integer key;
   private final String desc;

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

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

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

   public static String getDesc(Integer key) {
      AccTradeStateEnum[] tradeValues = values();
       for (AccTradeStateEnum temp : tradeValues) {
           if (temp.getKey().equals(key)) {
               return temp.getDesc();
           }
       }
      return "";
   }
}
