package com.bonus.core.nutrition.common.enums;

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

public enum DoctorAdviceEnum implements LeExcelFieldEnum<DoctorAdviceEnum> {
   FAST(1, "禁食"),
   LIQUID_DIET(2, "流食"),
   SEMIFLUID_FOOD(3, "半流食"),
   THERAPEUTIC_DIET(4, "治疗饮食");

   private final Integer key;
   private final String desc;

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

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

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

      return "";
   }

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

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

   // $FF: synthetic method
   private static DoctorAdviceEnum[] $values() {
      return new DoctorAdviceEnum[]{FAST, LIQUID_DIET, SEMIFLUID_FOOD, THERAPEUTIC_DIET};
   }

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