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

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

import javax.validation.constraints.NotNull;

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

   }
}
