package com.bonus.canteen.core.customer.model;

import com.baomidou.mybatisplus.annotation.*;
import com.bonus.canteen.core.common.utils.SysUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

@TableName("cust_photo")
@ApiModel("人员生物识别特征表")
public class CustPhoto {
   private static final long serialVersionUID = 1L;
   @TableId
   @ApiModelProperty("主键自增")
   private Long id;
   @ApiModelProperty("图片id")
   private Long photoId;
   @ApiModelProperty("人员id")
   private Long custId;
   @ApiModelProperty("照片地址")
   private String photoUrl;
   @ApiModelProperty("特征码")
   private String features;
   @ApiModelProperty("第二特征码")
   private String secondFeatures;
   @ApiModelProperty("类型 1-照片 2-指纹 3-掌纹 4-掌静脉 5-指静脉 6-虹膜")
   private Integer photoType;
   @ApiModelProperty("人脸算法版本")
   private Integer faceVer;
   @ApiModelProperty("特征码生成状态")
   private Integer featuresBuildStatus;
   @ApiModelProperty("特征码生成时间")
   private LocalDateTime featuresBuildTime;
   @ApiModelProperty("状态 1-正常 2-挂失 3-冻结 4-销户")
   private Integer photoState;
   @ApiModelProperty("乐观锁")
   private Integer revision;
   @TableField(
      fill = FieldFill.INSERT
   )
   @ApiModelProperty("创建人")
   private String crby;
   @TableField(
      fill = FieldFill.INSERT
   )
   @ApiModelProperty("创建时间")
   private LocalDateTime crtime;
   @TableField(
      fill = FieldFill.INSERT_UPDATE
   )
   @ApiModelProperty("更新人")
   private String upby;
   @TableField(
      fill = FieldFill.INSERT_UPDATE
   )
   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss.SSS"
   )
   @ApiModelProperty("更新时间")
   private LocalDateTime uptime;
   @ApiModelProperty("生成特征值异常原因")
   private String errorMsg;
   @ApiModelProperty("照片失效日期2023-12-13当天有效,null表示永久有效")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private LocalDate expireDate;

   public CustPhoto setPhotoUrl(String photoUrl) {
      this.photoUrl = SysUtil.getCutPath(photoUrl);
      return this;
   }

   public Long getId() {
      return this.id;
   }

   public Long getPhotoId() {
      return this.photoId;
   }

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

   public String getPhotoUrl() {
      return this.photoUrl;
   }

   public String getFeatures() {
      return this.features;
   }

   public String getSecondFeatures() {
      return this.secondFeatures;
   }

   public Integer getPhotoType() {
      return this.photoType;
   }

   public Integer getFaceVer() {
      return this.faceVer;
   }

   public Integer getFeaturesBuildStatus() {
      return this.featuresBuildStatus;
   }

   public LocalDateTime getFeaturesBuildTime() {
      return this.featuresBuildTime;
   }

   public Integer getPhotoState() {
      return this.photoState;
   }

   public Integer getRevision() {
      return this.revision;
   }

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

   public LocalDate getExpireDate() {
      return this.expireDate;
   }

   public void setId(final Long id) {
      this.id = id;
   }

   public void setPhotoId(final Long photoId) {
      this.photoId = photoId;
   }

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

   public void setFeatures(final String features) {
      this.features = features;
   }

   public void setSecondFeatures(final String secondFeatures) {
      this.secondFeatures = secondFeatures;
   }

   public void setPhotoType(final Integer photoType) {
      this.photoType = photoType;
   }

   public void setFaceVer(final Integer faceVer) {
      this.faceVer = faceVer;
   }

   public void setFeaturesBuildStatus(final Integer featuresBuildStatus) {
      this.featuresBuildStatus = featuresBuildStatus;
   }

   public void setFeaturesBuildTime(final LocalDateTime featuresBuildTime) {
      this.featuresBuildTime = featuresBuildTime;
   }

   public void setPhotoState(final Integer photoState) {
      this.photoState = photoState;
   }

   public void setRevision(final Integer revision) {
      this.revision = revision;
   }

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

   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.SSS"
   )
   public void setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
   }

   public void setErrorMsg(final String errorMsg) {
      this.errorMsg = errorMsg;
   }

   public void setExpireDate(final LocalDate expireDate) {
      this.expireDate = expireDate;
   }

   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof CustPhoto)) {
         return false;
      } else {
         CustPhoto other = (CustPhoto)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            Object this$id = this.getId();
            Object other$id = other.getId();
            if (this$id == null) {
               if (other$id != null) {
                  return false;
               }
            } else if (!this$id.equals(other$id)) {
               return false;
            }

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

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

               return false;
            }

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

               return false;
            }

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

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

               return false;
            }

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

               return false;
            }

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

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

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

               return false;
            }

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

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

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

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

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

               return false;
            }

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

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

            return true;
         }
      }
   }

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

   public int hashCode() {
      int result = 1;
      Object $id = this.getId();
      result = result * 59 + ($id == null ? 43 : $id.hashCode());
      Object $photoId = this.getPhotoId();
      result = result * 59 + ($photoId == null ? 43 : $photoId.hashCode());
      Object $custId = this.getCustId();
      result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
      Object $photoType = this.getPhotoType();
      result = result * 59 + ($photoType == null ? 43 : $photoType.hashCode());
      Object $faceVer = this.getFaceVer();
      result = result * 59 + ($faceVer == null ? 43 : $faceVer.hashCode());
      Object $featuresBuildStatus = this.getFeaturesBuildStatus();
      result = result * 59 + ($featuresBuildStatus == null ? 43 : $featuresBuildStatus.hashCode());
      Object $photoState = this.getPhotoState();
      result = result * 59 + ($photoState == null ? 43 : $photoState.hashCode());
      Object $revision = this.getRevision();
      result = result * 59 + ($revision == null ? 43 : $revision.hashCode());
      Object $photoUrl = this.getPhotoUrl();
      result = result * 59 + ($photoUrl == null ? 43 : $photoUrl.hashCode());
      Object $features = this.getFeatures();
      result = result * 59 + ($features == null ? 43 : $features.hashCode());
      Object $secondFeatures = this.getSecondFeatures();
      result = result * 59 + ($secondFeatures == null ? 43 : $secondFeatures.hashCode());
      Object $featuresBuildTime = this.getFeaturesBuildTime();
      result = result * 59 + ($featuresBuildTime == null ? 43 : $featuresBuildTime.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());
      Object $errorMsg = this.getErrorMsg();
      result = result * 59 + ($errorMsg == null ? 43 : $errorMsg.hashCode());
      Object $expireDate = this.getExpireDate();
      result = result * 59 + ($expireDate == null ? 43 : $expireDate.hashCode());
      return result;
   }

   public String toString() {
      Long var10000 = this.getId();
      return "CustPhoto(id=" + var10000 + ", photoId=" + this.getPhotoId() + ", custId=" + this.getCustId() + ", photoUrl=" + this.getPhotoUrl() + ", features=" + this.getFeatures() + ", secondFeatures=" + this.getSecondFeatures() + ", photoType=" + this.getPhotoType() + ", faceVer=" + this.getFaceVer() + ", featuresBuildStatus=" + this.getFeaturesBuildStatus() + ", featuresBuildTime=" + String.valueOf(this.getFeaturesBuildTime()) + ", photoState=" + this.getPhotoState() + ", revision=" + this.getRevision() + ", crby=" + this.getCrby() + ", crtime=" + String.valueOf(this.getCrtime()) + ", upby=" + this.getUpby() + ", uptime=" + String.valueOf(this.getUptime()) + ", errorMsg=" + this.getErrorMsg() + ", expireDate=" + String.valueOf(this.getExpireDate()) + ")";
   }
}
