package com.bonus.core.menu.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;

@Data
public class AppletReserveRecipeDTO {
   @ApiModelProperty("菜谱日期")
   private @NotNull(
           message = "{menu_apply_date_null}"
   ) LocalDate applyDate;
   @ApiModelProperty("菜谱id")
   private @NotNull(
           message = "{menu_recipe_id_null}"
   ) Long recipeId;
   @ApiModelProperty("人员id")
   private Long custId;

   public LocalDate getApplyDate() {
      return this.applyDate;
   }

   public Long getRecipeId() {
      return this.recipeId;
   }

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

   public void setApplyDate(final LocalDate applyDate) {
      this.applyDate = applyDate;
   }

   public void setRecipeId(final Long recipeId) {
      this.recipeId = recipeId;
   }

   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 AppletReserveRecipeDTO)) {
         return false;
      } else {
         AppletReserveRecipeDTO other = (AppletReserveRecipeDTO)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            label47: {
               Object this$recipeId = this.getRecipeId();
               Object other$recipeId = other.getRecipeId();
               if (this$recipeId == null) {
                  if (other$recipeId == null) {
                     break label47;
                  }
               } else if (this$recipeId.equals(other$recipeId)) {
                  break label47;
               }

               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$applyDate = this.getApplyDate();
            Object other$applyDate = other.getApplyDate();
            if (this$applyDate == null) {
               if (other$applyDate != null) {
                  return false;
               }
            } else if (!this$applyDate.equals(other$applyDate)) {
               return false;
            }

            return true;
         }
      }
   }

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

   @Override
   public int hashCode() {
      int result = 1;
      Object $recipeId = this.getRecipeId();
      result = result * 59 + ($recipeId == null ? 43 : $recipeId.hashCode());
      Object $custId = this.getCustId();
      result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
      Object $applyDate = this.getApplyDate();
      result = result * 59 + ($applyDate == null ? 43 : $applyDate.hashCode());
      return result;
   }

   @Override
   public String toString() {
      String var10000 = String.valueOf(this.getApplyDate());
      return "AppletReserveRecipeDTO(applyDate=" + var10000 + ", recipeId=" + this.getRecipeId() + ", custId=" + this.getCustId() + ")";
   }
}
