package com.bonus.canteen.core.supply.purchase.constants;

import com.bonus.canteen.core.account.constants.AccTradeTypeEnum;
import com.google.common.collect.Maps;

import java.util.Map;

public enum NoticeTemplateKeyEnum {
   REGISTRATION_VERIFICATION_CODE("001001", "注册验证通知", ""),
   ORDER_CREATED("002001", "下单成功通知", ""),
   ORDER_DISH_COMPLETED("002002", "菜品制作通知", ""),
   ACC_PAY("003001", "消费成功通知", ""),
   ACC_RECHARGE("003002", "充值成功通知", ""),
   ACC_WITHDRAW("003003", "提现成功通知", ""),
   ACC_REFUND("003004", "退款成功通知", ""),
   ACC_REPAIR_DEDUCT("003005", "消费补扣通知", ""),
   ACC_FROZEN("003006", "冻结金额通知", ""),
   ACC_UNFROZEN("003007", "解冻金额通知", ""),
   ACC_SUB_CLEAR("003008", "补贴清空通知", ""),
   ACC_SUB("003009", "补贴发放通知", ""),
   ACC_BALANCE_INSUFFICIENT("003010", "余额不足通知", ""),
   ACC_RED_SEND("003011", "红包发放通知", ""),
   ACC_TRANSFER("003012", "转账通知", ""),
   ACC_STATUS_DEACTIVATE("003014", "账户停用通知", ""),
   ACC_STATUS_OVERDUE("003015", "账户过期通知", ""),
   VISIT_TAKE("004001", "到店取餐通知", ""),
   CABINET_TAKE("004002", "取餐柜取餐通知", ""),
   CABINET_TAKE_OVER_TIME("004003", "取餐超时通知", ""),
   CABINET_TAKE_CLEAN("004004", "取餐超时清理通知", ""),
   ORDER_REFUND_SUCCESS("005001", "退单成功通知", ""),
   ORDER_REFUND_FAIL("005002", "退单失败通知", ""),
   BINDING_PLATE_SUCCESS("006001", "绑盘成功通知", ""),
   MEAL_FINISHED("006002", "就餐结束通知", ""),
   ERROR_CORRECTION_REFUND_SUCCESS("006003", "纠错退款成功通知", ""),
   ERROR_CORRECTION_REFUND_FAIL("006004", "纠错退款失败通知", ""),
   RECIPE_CUSTOMIZATION("007001", "菜谱定制通知", ""),
   DOOR_CONTROL_OFFLINE("008001", "门禁离线通知", ""),
   STRANGER_SCAN("008002", "陌生人扫脸通知", ""),
   DEVICE_OFFLINE("009001", "到店取餐通知", ""),
   MENUAI_REGISTER("010001", "注册菜品识别通知", ""),
   DRP_SINGLE_SUPPLY("011001", "供货单通知", ""),
   DRP_OFFER_SUPPLY("011002", "报价通知", ""),
   DRP_GOODS_QUOTE("011003", "询价单报价通知", "您有一笔新的询价单:#{0},请及时报价!"),
   DRP_SUPPLIER_BJ("011004", "供应商报价通知", ""),
   DRP_ADMIN_JB("011005", "采购员决标通知", ""),
   DRP_AGAIN_QUOTE("011006", "采购员发起再次报价", ""),
   DRP_AGREE_QUOTE("011007", "采购员发起意向中标价", ""),
   DRP_SUPPLIER_AGREE("011008", "供应商接受/拒绝意向中标价", ""),
   DRP_PUR_PLAN_SUPPLY("011009", "采购订单", "您有一笔新的采购订单:#{0},请及时确认,确认后请进行拆单!"),
   DRP_SUPPLIER_QUOTE("011010", "供应商报价", ""),
   DRP_SUPPLIER_JB("011011", "供应商决标", "您有一笔采购询价单已中标!单号:#{0}。"),
   BACK_FIELD_ALARM("012001", "违规报警通知", ""),
   INTERVIEWEE_AUDIT("013001", "预约待审核通知审核对象", ""),
   INTERVIEWEE_VISITOR_SIGN_IN("013002", "访客到达通知被放对象", ""),
   VISITOR_AUDIT_PASS("014001", "访客预约审核通过通知", ""),
   VISITOR_INVITATION("014002", "访客邀约通知被放对象", "");

   private final String key;
   private final String desc;
   private final String noticeTemplate;

   private NoticeTemplateKeyEnum(String key, String desc, String noticeTemplate) {
      this.key = key;
      this.desc = desc;
      this.noticeTemplate = noticeTemplate;
   }

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

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

   public String getNoticeTemplate() {
      return noticeTemplate;
   }

   private static final Map<String, String> keyToNoticeTemplateMap = Maps.newHashMap();

   static {
      for (NoticeTemplateKeyEnum item : values()) {
         keyToNoticeTemplateMap.put(item.getKey(), item.getNoticeTemplate());
      }
   }

   public static String getNoticeTemplateByKey(String key) {
      return keyToNoticeTemplateMap.get(key);
   }
}
