package com.bonus.canteen.core.order.mobile.vo;

import cn.hutool.core.bean.BeanUtil;
import com.bonus.canteen.core.common.constant.LeRetCodeEnum;
import com.bonus.canteen.core.common.utils.SysUtil;
import com.bonus.canteen.core.order.common.model.OrderShoppingCart;
import com.fasterxml.jackson.databind.JsonNode;

import java.time.LocalDate;

public class OrderShoppingCartAddResultVO {
   private Integer code;
   private String msg;
   private Long shoppingCartId;
   private Long custId;
   private Long menuId;
   private Long goodsDishesId;
   private String goodsDishesName;
   private String goodsDishesImgUrl;
   private Long canteenId;
   private Long stallId;
   private Integer detailType;
   private Integer orderType;
   private LocalDate orderDate;
   private Integer mealtimeType;
   private Integer quantity;
   private JsonNode extParam;

   public String getGoodsDishesImgUrl() {
      return SysUtil.getCutFileUrl(this.goodsDishesImgUrl);
   }

   public static OrderShoppingCartAddResultVO of(OrderShoppingCart orderShoppingCart) {
      OrderShoppingCartAddResultVO vo = (OrderShoppingCartAddResultVO)BeanUtil.copyProperties(orderShoppingCart, OrderShoppingCartAddResultVO.class, new String[0]);
      vo.setCode(LeRetCodeEnum.SUCC.getKey());
      vo.setMsg(LeRetCodeEnum.SUCC.getDesc());
      return vo;
   }

   public Integer getCode() {
      return this.code;
   }

   public String getMsg() {
      return this.msg;
   }

   public Long getShoppingCartId() {
      return this.shoppingCartId;
   }

   public Long getCustId() {
      return this.custId;
   }

   public Long getMenuId() {
      return this.menuId;
   }

   public Long getGoodsDishesId() {
      return this.goodsDishesId;
   }

   public String getGoodsDishesName() {
      return this.goodsDishesName;
   }

   public Long getCanteenId() {
      return this.canteenId;
   }

   public Long getStallId() {
      return this.stallId;
   }

   public Integer getDetailType() {
      return this.detailType;
   }

   public Integer getOrderType() {
      return this.orderType;
   }

   public LocalDate getOrderDate() {
      return this.orderDate;
   }

   public Integer getMealtimeType() {
      return this.mealtimeType;
   }

   public Integer getQuantity() {
      return this.quantity;
   }

   public JsonNode getExtParam() {
      return this.extParam;
   }

   public void setCode(final Integer code) {
      this.code = code;
   }

   public void setMsg(final String msg) {
      this.msg = msg;
   }

   public void setShoppingCartId(final Long shoppingCartId) {
      this.shoppingCartId = shoppingCartId;
   }

   public void setCustId(final Long custId) {
      this.custId = custId;
   }

   public void setMenuId(final Long menuId) {
      this.menuId = menuId;
   }

   public void setGoodsDishesId(final Long goodsDishesId) {
      this.goodsDishesId = goodsDishesId;
   }

   public void setGoodsDishesName(final String goodsDishesName) {
      this.goodsDishesName = goodsDishesName;
   }

   public void setGoodsDishesImgUrl(final String goodsDishesImgUrl) {
      this.goodsDishesImgUrl = goodsDishesImgUrl;
   }

   public void setCanteenId(final Long canteenId) {
      this.canteenId = canteenId;
   }

   public void setStallId(final Long stallId) {
      this.stallId = stallId;
   }

   public void setDetailType(final Integer detailType) {
      this.detailType = detailType;
   }

   public void setOrderType(final Integer orderType) {
      this.orderType = orderType;
   }

   public void setOrderDate(final LocalDate orderDate) {
      this.orderDate = orderDate;
   }

   public void setMealtimeType(final Integer mealtimeType) {
      this.mealtimeType = mealtimeType;
   }

   public void setQuantity(final Integer quantity) {
      this.quantity = quantity;
   }

   public void setExtParam(final JsonNode extParam) {
      this.extParam = extParam;
   }

   @Override
   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof OrderShoppingCartAddResultVO)) {
         return false;
      } else {
         OrderShoppingCartAddResultVO other = (OrderShoppingCartAddResultVO)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            label203: {
               Object this$code = this.getCode();
               Object other$code = other.getCode();
               if (this$code == null) {
                  if (other$code == null) {
                     break label203;
                  }
               } else if (this$code.equals(other$code)) {
                  break label203;
               }

               return false;
            }

            Object this$shoppingCartId = this.getShoppingCartId();
            Object other$shoppingCartId = other.getShoppingCartId();
            if (this$shoppingCartId == null) {
               if (other$shoppingCartId != null) {
                  return false;
               }
            } else if (!this$shoppingCartId.equals(other$shoppingCartId)) {
               return false;
            }

            Object this$custId = this.getCustId();
            Object other$custId = other.getCustId();
            if (this$custId == null) {
               if (other$custId != null) {
                  return false;
               }
            } else if (!this$custId.equals(other$custId)) {
               return false;
            }

            label182: {
               Object this$menuId = this.getMenuId();
               Object other$menuId = other.getMenuId();
               if (this$menuId == null) {
                  if (other$menuId == null) {
                     break label182;
                  }
               } else if (this$menuId.equals(other$menuId)) {
                  break label182;
               }

               return false;
            }

            label175: {
               Object this$goodsDishesId = this.getGoodsDishesId();
               Object other$goodsDishesId = other.getGoodsDishesId();
               if (this$goodsDishesId == null) {
                  if (other$goodsDishesId == null) {
                     break label175;
                  }
               } else if (this$goodsDishesId.equals(other$goodsDishesId)) {
                  break label175;
               }

               return false;
            }

            label168: {
               Object this$canteenId = this.getCanteenId();
               Object other$canteenId = other.getCanteenId();
               if (this$canteenId == null) {
                  if (other$canteenId == null) {
                     break label168;
                  }
               } else if (this$canteenId.equals(other$canteenId)) {
                  break label168;
               }

               return false;
            }

            Object this$stallId = this.getStallId();
            Object other$stallId = other.getStallId();
            if (this$stallId == null) {
               if (other$stallId != null) {
                  return false;
               }
            } else if (!this$stallId.equals(other$stallId)) {
               return false;
            }

            label154: {
               Object this$detailType = this.getDetailType();
               Object other$detailType = other.getDetailType();
               if (this$detailType == null) {
                  if (other$detailType == null) {
                     break label154;
                  }
               } else if (this$detailType.equals(other$detailType)) {
                  break label154;
               }

               return false;
            }

            Object this$orderType = this.getOrderType();
            Object other$orderType = other.getOrderType();
            if (this$orderType == null) {
               if (other$orderType != null) {
                  return false;
               }
            } else if (!this$orderType.equals(other$orderType)) {
               return false;
            }

            label140: {
               Object this$mealtimeType = this.getMealtimeType();
               Object other$mealtimeType = other.getMealtimeType();
               if (this$mealtimeType == null) {
                  if (other$mealtimeType == null) {
                     break label140;
                  }
               } else if (this$mealtimeType.equals(other$mealtimeType)) {
                  break label140;
               }

               return false;
            }

            Object this$quantity = this.getQuantity();
            Object other$quantity = other.getQuantity();
            if (this$quantity == null) {
               if (other$quantity != null) {
                  return false;
               }
            } else if (!this$quantity.equals(other$quantity)) {
               return false;
            }

            Object this$msg = this.getMsg();
            Object other$msg = other.getMsg();
            if (this$msg == null) {
               if (other$msg != null) {
                  return false;
               }
            } else if (!this$msg.equals(other$msg)) {
               return false;
            }

            label119: {
               Object this$goodsDishesName = this.getGoodsDishesName();
               Object other$goodsDishesName = other.getGoodsDishesName();
               if (this$goodsDishesName == null) {
                  if (other$goodsDishesName == null) {
                     break label119;
                  }
               } else if (this$goodsDishesName.equals(other$goodsDishesName)) {
                  break label119;
               }

               return false;
            }

            label112: {
               Object this$goodsDishesImgUrl = this.getGoodsDishesImgUrl();
               Object other$goodsDishesImgUrl = other.getGoodsDishesImgUrl();
               if (this$goodsDishesImgUrl == null) {
                  if (other$goodsDishesImgUrl == null) {
                     break label112;
                  }
               } else if (this$goodsDishesImgUrl.equals(other$goodsDishesImgUrl)) {
                  break label112;
               }

               return false;
            }

            Object this$orderDate = this.getOrderDate();
            Object other$orderDate = other.getOrderDate();
            if (this$orderDate == null) {
               if (other$orderDate != null) {
                  return false;
               }
            } else if (!this$orderDate.equals(other$orderDate)) {
               return false;
            }

            Object this$extParam = this.getExtParam();
            Object other$extParam = other.getExtParam();
            if (this$extParam == null) {
               if (other$extParam != null) {
                  return false;
               }
            } else if (!this$extParam.equals(other$extParam)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(final Object other) {
      return other instanceof OrderShoppingCartAddResultVO;
   }

   @Override
   public int hashCode() {
      int result = 1;
      Object $code = this.getCode();
      result = result * 59 + ($code == null ? 43 : $code.hashCode());
      Object $shoppingCartId = this.getShoppingCartId();
      result = result * 59 + ($shoppingCartId == null ? 43 : $shoppingCartId.hashCode());
      Object $custId = this.getCustId();
      result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
      Object $menuId = this.getMenuId();
      result = result * 59 + ($menuId == null ? 43 : $menuId.hashCode());
      Object $goodsDishesId = this.getGoodsDishesId();
      result = result * 59 + ($goodsDishesId == null ? 43 : $goodsDishesId.hashCode());
      Object $canteenId = this.getCanteenId();
      result = result * 59 + ($canteenId == null ? 43 : $canteenId.hashCode());
      Object $stallId = this.getStallId();
      result = result * 59 + ($stallId == null ? 43 : $stallId.hashCode());
      Object $detailType = this.getDetailType();
      result = result * 59 + ($detailType == null ? 43 : $detailType.hashCode());
      Object $orderType = this.getOrderType();
      result = result * 59 + ($orderType == null ? 43 : $orderType.hashCode());
      Object $mealtimeType = this.getMealtimeType();
      result = result * 59 + ($mealtimeType == null ? 43 : $mealtimeType.hashCode());
      Object $quantity = this.getQuantity();
      result = result * 59 + ($quantity == null ? 43 : $quantity.hashCode());
      Object $msg = this.getMsg();
      result = result * 59 + ($msg == null ? 43 : $msg.hashCode());
      Object $goodsDishesName = this.getGoodsDishesName();
      result = result * 59 + ($goodsDishesName == null ? 43 : $goodsDishesName.hashCode());
      Object $goodsDishesImgUrl = this.getGoodsDishesImgUrl();
      result = result * 59 + ($goodsDishesImgUrl == null ? 43 : $goodsDishesImgUrl.hashCode());
      Object $orderDate = this.getOrderDate();
      result = result * 59 + ($orderDate == null ? 43 : $orderDate.hashCode());
      Object $extParam = this.getExtParam();
      result = result * 59 + ($extParam == null ? 43 : $extParam.hashCode());
      return result;
   }

   @Override
   public String toString() {
      Integer var10000 = this.getCode();
      return "OrderShoppingCartAddResultVO(code=" + var10000 + ", msg=" + this.getMsg() + ", shoppingCartId=" + this.getShoppingCartId() + ", custId=" + this.getCustId() + ", menuId=" + this.getMenuId() + ", goodsDishesId=" + this.getGoodsDishesId() + ", goodsDishesName=" + this.getGoodsDishesName() + ", goodsDishesImgUrl=" + this.getGoodsDishesImgUrl() + ", canteenId=" + this.getCanteenId() + ", stallId=" + this.getStallId() + ", detailType=" + this.getDetailType() + ", orderType=" + this.getOrderType() + ", orderDate=" + String.valueOf(this.getOrderDate()) + ", mealtimeType=" + this.getMealtimeType() + ", quantity=" + this.getQuantity() + ", extParam=" + String.valueOf(this.getExtParam()) + ")";
   }
}
