package com.bonus.core.order.common.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.JsonNode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

public class OrderShoppingCart {
   @TableId
   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 quantity;
   private Integer orderType;
   private Integer detailType;
   private LocalDate orderDate;
   private Integer mealtimeType;
   private JsonNode extParam;
   private String crby;
   @DateTimeFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   private LocalDateTime crtime;
   private String upby;
   @DateTimeFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   private LocalDateTime uptime;

   public static String[] logFields() {
      return new String[]{"shoppingCartId", "custId", "menuId", "goodsDishesId", "goodsDishesName", "goodsDishesImgUrl", "canteenId", "stallId", "quantity", "orderType", "detailType", "orderDate", "mealtimeType"};
   }

   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 String getGoodsDishesImgUrl() {
      return this.goodsDishesImgUrl;
   }

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

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

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

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

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

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

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

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

   public String getCrby() {
      return this.crby;
   }

   public LocalDateTime getCrtime() {
      return this.crtime;
   }

   public String getUpby() {
      return this.upby;
   }

   public LocalDateTime getUptime() {
      return this.uptime;
   }

   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 setQuantity(final Integer quantity) {
      this.quantity = quantity;
   }

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

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

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

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

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

   public void setCrby(final String crby) {
      this.crby = crby;
   }

   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   public void setCrtime(final LocalDateTime crtime) {
      this.crtime = crtime;
   }

   public void setUpby(final String upby) {
      this.upby = upby;
   }

   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   public void setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
   }

   @Override
   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof OrderShoppingCart)) {
         return false;
      } else {
         OrderShoppingCart other = (OrderShoppingCart)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            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;
            }

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

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

               return false;
            }

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

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

            label185: {
               Object this$quantity = this.getQuantity();
               Object other$quantity = other.getQuantity();
               if (this$quantity == null) {
                  if (other$quantity == null) {
                     break label185;
                  }
               } else if (this$quantity.equals(other$quantity)) {
                  break label185;
               }

               return false;
            }

            label178: {
               Object this$orderType = this.getOrderType();
               Object other$orderType = other.getOrderType();
               if (this$orderType == null) {
                  if (other$orderType == null) {
                     break label178;
                  }
               } else if (this$orderType.equals(other$orderType)) {
                  break label178;
               }

               return false;
            }

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

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

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

               return false;
            }

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

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

            label136: {
               Object this$extParam = this.getExtParam();
               Object other$extParam = other.getExtParam();
               if (this$extParam == null) {
                  if (other$extParam == null) {
                     break label136;
                  }
               } else if (this$extParam.equals(other$extParam)) {
                  break label136;
               }

               return false;
            }

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

            label122: {
               Object this$crtime = this.getCrtime();
               Object other$crtime = other.getCrtime();
               if (this$crtime == null) {
                  if (other$crtime == null) {
                     break label122;
                  }
               } else if (this$crtime.equals(other$crtime)) {
                  break label122;
               }

               return false;
            }

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

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

            return true;
         }
      }
   }

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

   @Override
   public int hashCode() {
      int result = 1;
      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 $quantity = this.getQuantity();
      result = result * 59 + ($quantity == null ? 43 : $quantity.hashCode());
      Object $orderType = this.getOrderType();
      result = result * 59 + ($orderType == null ? 43 : $orderType.hashCode());
      Object $detailType = this.getDetailType();
      result = result * 59 + ($detailType == null ? 43 : $detailType.hashCode());
      Object $mealtimeType = this.getMealtimeType();
      result = result * 59 + ($mealtimeType == null ? 43 : $mealtimeType.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());
      Object $crby = this.getCrby();
      result = result * 59 + ($crby == null ? 43 : $crby.hashCode());
      Object $crtime = this.getCrtime();
      result = result * 59 + ($crtime == null ? 43 : $crtime.hashCode());
      Object $upby = this.getUpby();
      result = result * 59 + ($upby == null ? 43 : $upby.hashCode());
      Object $uptime = this.getUptime();
      result = result * 59 + ($uptime == null ? 43 : $uptime.hashCode());
      return result;
   }

   @Override
   public String toString() {
      Long var10000 = this.getShoppingCartId();
      return "OrderShoppingCart(shoppingCartId=" + var10000 + ", custId=" + this.getCustId() + ", menuId=" + this.getMenuId() + ", goodsDishesId=" + this.getGoodsDishesId() + ", goodsDishesName=" + this.getGoodsDishesName() + ", goodsDishesImgUrl=" + this.getGoodsDishesImgUrl() + ", canteenId=" + this.getCanteenId() + ", stallId=" + this.getStallId() + ", quantity=" + this.getQuantity() + ", orderType=" + this.getOrderType() + ", detailType=" + this.getDetailType() + ", orderDate=" + String.valueOf(this.getOrderDate()) + ", mealtimeType=" + this.getMealtimeType() + ", extParam=" + String.valueOf(this.getExtParam()) + ", crby=" + this.getCrby() + ", crtime=" + String.valueOf(this.getCrtime()) + ", upby=" + this.getUpby() + ", uptime=" + String.valueOf(this.getUptime()) + ")";
   }
}
