package com.bonus.core.notice.notice.v2.constant;

import com.bonus.core.account.v3.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", "询价单报价通知"),
   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", "采购订单"),
   DRP_SUPPLIER_QUOTE("011010", "供应商报价"),
   DRP_SUPPLIER_JB("011011", "供应商决标"),
   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 NoticeTemplateKeyEnum(String key, String desc) {
      this.key = key;
      this.desc = desc;
   }

   public static Map<Integer, String> accTrade4TemplateKeyMap() {
      Map<Integer, String> templateKeyMap = Maps.newHashMap();
      templateKeyMap.put(AccTradeTypeEnum.RECHARGE.getKey(), ACC_RECHARGE.getKey());
      templateKeyMap.put(AccTradeTypeEnum.SUBSIDY.getKey(), ACC_SUB.getKey());
      templateKeyMap.put(AccTradeTypeEnum.WITHDRAW.getKey(), ACC_WITHDRAW.getKey());
      templateKeyMap.put(AccTradeTypeEnum.FREEZE.getKey(), ACC_FROZEN.getKey());
      templateKeyMap.put(AccTradeTypeEnum.UN_FREEZE.getKey(), ACC_UNFROZEN.getKey());
      templateKeyMap.put(AccTradeTypeEnum.CLEAR.getKey(), ACC_SUB_CLEAR.getKey());
      templateKeyMap.put(AccTradeTypeEnum.CONSUME.getKey(), ACC_PAY.getKey());
      templateKeyMap.put(AccTradeTypeEnum.CONSUME_REPAIR.getKey(), ACC_REPAIR_DEDUCT.getKey());
      templateKeyMap.put(AccTradeTypeEnum.CONSUME_REFUND.getKey(), ACC_REFUND.getKey());
      templateKeyMap.put(AccTradeTypeEnum.LUCK_MONEY.getKey(), ACC_RED_SEND.getKey());
      templateKeyMap.put(AccTradeTypeEnum.TRANSFER_IN.getKey(), ACC_TRANSFER.getKey());
      return templateKeyMap;
   }

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

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

   // $FF: synthetic method
   private static NoticeTemplateKeyEnum[] $values() {
      return new NoticeTemplateKeyEnum[]{REGISTRATION_VERIFICATION_CODE, ORDER_CREATED, ORDER_DISH_COMPLETED, ACC_PAY, ACC_RECHARGE, ACC_WITHDRAW, ACC_REFUND, ACC_REPAIR_DEDUCT, ACC_FROZEN, ACC_UNFROZEN, ACC_SUB_CLEAR, ACC_SUB, ACC_BALANCE_INSUFFICIENT, ACC_RED_SEND, ACC_TRANSFER, ACC_STATUS_DEACTIVATE, ACC_STATUS_OVERDUE, VISIT_TAKE, CABINET_TAKE, CABINET_TAKE_OVER_TIME, CABINET_TAKE_CLEAN, ORDER_REFUND_SUCCESS, ORDER_REFUND_FAIL, BINDING_PLATE_SUCCESS, MEAL_FINISHED, ERROR_CORRECTION_REFUND_SUCCESS, ERROR_CORRECTION_REFUND_FAIL, RECIPE_CUSTOMIZATION, DOOR_CONTROL_OFFLINE, STRANGER_SCAN, DEVICE_OFFLINE, MENUAI_REGISTER, DRP_SINGLE_SUPPLY, DRP_OFFER_SUPPLY, DRP_GOODS_QUOTE, DRP_SUPPLIER_BJ, DRP_ADMIN_JB, DRP_AGAIN_QUOTE, DRP_AGREE_QUOTE, DRP_SUPPLIER_AGREE, DRP_PUR_PLAN_SUPPLY, DRP_SUPPLIER_QUOTE, DRP_SUPPLIER_JB, BACK_FIELD_ALARM, INTERVIEWEE_AUDIT, INTERVIEWEE_VISITOR_SIGN_IN, VISITOR_AUDIT_PASS, VISITOR_INVITATION};
   }
}
