package com.bonus.canteen.core.account.v3.web.dto;

import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

@Data
public class AccInfoDetailDTO {
   @ApiModelProperty("人员id")
   private @NotNull(
           message = "{acc_single_null_custid_exception}"
   ) Long custId;
   @ApiModelProperty("是否查询用户卡片信息,默认查询")
   private Boolean ifQueryCardInfoBoolean;

   public Boolean getIfQueryCardInfoBoolean() {
      return ObjectUtil.isNull(this.ifQueryCardInfoBoolean) ? Boolean.TRUE : this.ifQueryCardInfoBoolean;
   }

   public static AccInfoDetailDTOBuilder builder() {
      return new AccInfoDetailDTOBuilder();
   }

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

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

   public void setIfQueryCardInfoBoolean(final Boolean ifQueryCardInfoBoolean) {
      this.ifQueryCardInfoBoolean = ifQueryCardInfoBoolean;
   }

   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof AccInfoDetailDTO)) {
         return false;
      } else {
         AccInfoDetailDTO other = (AccInfoDetailDTO)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            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$ifQueryCardInfoBoolean = this.getIfQueryCardInfoBoolean();
            Object other$ifQueryCardInfoBoolean = other.getIfQueryCardInfoBoolean();
            if (this$ifQueryCardInfoBoolean == null) {
               if (other$ifQueryCardInfoBoolean != null) {
                  return false;
               }
            } else if (!this$ifQueryCardInfoBoolean.equals(other$ifQueryCardInfoBoolean)) {
               return false;
            }

            return true;
         }
      }
   }

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


   public String toString() {
      Long var10000 = this.getCustId();
      return "AccInfoDetailDTO(custId=" + var10000 + ", ifQueryCardInfoBoolean=" + this.getIfQueryCardInfoBoolean() + ")";
   }

   public AccInfoDetailDTO(final Long custId, final Boolean ifQueryCardInfoBoolean) {
      this.custId = custId;
      this.ifQueryCardInfoBoolean = ifQueryCardInfoBoolean;
   }

   public AccInfoDetailDTO() {
   }

   public static class AccInfoDetailDTOBuilder {
      private Long custId;
      private Boolean ifQueryCardInfoBoolean;

      AccInfoDetailDTOBuilder() {
      }

      public AccInfoDetailDTOBuilder custId(final Long custId) {
         this.custId = custId;
         return this;
      }

      public AccInfoDetailDTOBuilder ifQueryCardInfoBoolean(final Boolean ifQueryCardInfoBoolean) {
         this.ifQueryCardInfoBoolean = ifQueryCardInfoBoolean;
         return this;
      }

      public AccInfoDetailDTO build() {
         return new AccInfoDetailDTO(this.custId, this.ifQueryCardInfoBoolean);
      }

      public String toString() {
         return "AccInfoDetailDTO.AccInfoDetailDTOBuilder(custId=" + this.custId + ", ifQueryCardInfoBoolean=" + this.ifQueryCardInfoBoolean + ")";
      }
   }
}
