package com.bonus.core.order.mobile.dto;

import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

public class OrderShoppingCartUpdateDTO {
   @ApiModelProperty("购物车id")
   private @NotNull
   Long shoppingCartId;
   @ApiModelProperty("数量/重量")
   private @NotNull @Min(0L) Integer quantity;
   @ApiModelProperty(
      value = "人员id",
      hidden = true
   )
   private @NotNull Long custId;

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

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

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

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

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

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

   @Override
   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof OrderShoppingCartUpdateDTO)) {
         return false;
      } else {
         OrderShoppingCartUpdateDTO other = (OrderShoppingCartUpdateDTO)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            label47: {
               Object this$shoppingCartId = this.getShoppingCartId();
               Object other$shoppingCartId = other.getShoppingCartId();
               if (this$shoppingCartId == null) {
                  if (other$shoppingCartId == null) {
                     break label47;
                  }
               } else if (this$shoppingCartId.equals(other$shoppingCartId)) {
                  break label47;
               }

               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$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;
            }

            return true;
         }
      }
   }

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

   @Override
   public int hashCode() {
      int result = 1;
      Object $shoppingCartId = this.getShoppingCartId();
      result = result * 59 + ($shoppingCartId == null ? 43 : $shoppingCartId.hashCode());
      Object $quantity = this.getQuantity();
      result = result * 59 + ($quantity == null ? 43 : $quantity.hashCode());
      Object $custId = this.getCustId();
      result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
      return result;
   }

   @Override
   public String toString() {
      Long var10000 = this.getShoppingCartId();
      return "OrderShoppingCartUpdateDTO(shoppingCartId=" + var10000 + ", quantity=" + this.getQuantity() + ", custId=" + this.getCustId() + ")";
   }
}
