package com.bonus.canteen.core.order.common.constants;

public enum OrderRefundBizEnum {
   MOBILE(1, "移动端整单退"),
   MOBILE_PART(2, "移动端部分退"),
   WEB(3, "web整单退"),
   WEB_PART(4, "web部分退"),
   ANDROID(5, "设备整单退"),
   ANDROID_PART(6, "设备部分退"),
   OPEN(7, "开放接口整单退"),
   OPEN_PART(8, "开放接口部分退"),
   PAD(9, "包间点餐平板整单退"),
   MOBILE_CORRECT(10, "移动端发起纠错"),
   APP_CORRECT(11, "乐牛app端发起纠错"),
   ANDROID_CORRECT(12, "设备端发起纠错"),
   OPEN_USER(13, "开放接口整单退"),
   OPEN_PART_USER(14, "开放接口部分退"),
   APP(15, "乐牛app整单退"),
   APP_PART(16, "乐牛app部分退"),
   TAKEAWAY(17, "外卖整单退"),
   CHECK_PASS(21, "审核通过");

   private final Integer key;
   private final String desc;

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

   public boolean ifWholeRefund() {
      return this == MOBILE || this == WEB || this == ANDROID || this == OPEN || this == PAD || this == OPEN_USER || this == APP || this == TAKEAWAY;
   }

   public boolean ifFromUser() {
      return this == MOBILE || this == MOBILE_PART || this == MOBILE_CORRECT || this == OPEN_USER || this == OPEN_PART_USER;
   }

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

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

}
