package com.bonus.core.supermarket.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

@ApiModel(
   value = "超市会员人员类别表",
   description = "超市会员人员类别表"
)
public class SupermarketMember {
   @ApiModelProperty("主键id")
   @TableId(
      value = "id",
      type = IdType.AUTO
   )
   private Long id;
   @ApiModelProperty("超市id")
   private Long supermarketId;
   @ApiModelProperty("人员类别id")
   private Integer psnType;
   @ApiModelProperty("乐观锁")
   private Integer revision;
   @TableField(
      value = "crby",
      fill = FieldFill.INSERT
   )
   @ApiModelProperty("创建人")
   private String crby;
   @TableField(
      value = "crtime",
      fill = FieldFill.INSERT
   )
   @ApiModelProperty("创建时间")
   private LocalDateTime crtime;
   @TableField(
      value = "upby",
      fill = FieldFill.UPDATE
   )
   @ApiModelProperty("更新人")
   private String upby;
   @TableField(
      value = "uptime",
      fill = FieldFill.UPDATE
   )
   @ApiModelProperty("更新时间")
   private LocalDateTime uptime;

   public SupermarketMember(Long supermarketId, Integer psnType) {
      this.supermarketId = supermarketId;
      this.psnType = psnType;
   }

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

   public Long getSupermarketId() {
      return this.supermarketId;
   }

   public Integer getPsnType() {
      return this.psnType;
   }

   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 SupermarketMember setId(final Long id) {
      this.id = id;
      return this;
   }

   public SupermarketMember setSupermarketId(final Long supermarketId) {
      this.supermarketId = supermarketId;
      return this;
   }

   public SupermarketMember setPsnType(final Integer psnType) {
      this.psnType = psnType;
      return this;
   }

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

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

   public SupermarketMember setCrtime(final LocalDateTime crtime) {
      this.crtime = crtime;
      return this;
   }

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

   public SupermarketMember setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
      return this;
   }

   @Override
   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof SupermarketMember)) {
         return false;
      } else {
         SupermarketMember other = (SupermarketMember)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            label107: {
               Object this$id = this.getId();
               Object other$id = other.getId();
               if (this$id == null) {
                  if (other$id == null) {
                     break label107;
                  }
               } else if (this$id.equals(other$id)) {
                  break label107;
               }

               return false;
            }

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

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

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

               return false;
            }

            label79: {
               Object this$crby = this.getCrby();
               Object other$crby = other.getCrby();
               if (this$crby == null) {
                  if (other$crby == null) {
                     break label79;
                  }
               } else if (this$crby.equals(other$crby)) {
                  break label79;
               }

               return false;
            }

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

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

   @Override
   public int hashCode() {
      int result = 1;
      Object $id = this.getId();
      result = result * 59 + ($id == null ? 43 : $id.hashCode());
      Object $supermarketId = this.getSupermarketId();
      result = result * 59 + ($supermarketId == null ? 43 : $supermarketId.hashCode());
      Object $psnType = this.getPsnType();
      result = result * 59 + ($psnType == null ? 43 : $psnType.hashCode());
      Object $revision = this.getRevision();
      result = result * 59 + ($revision == null ? 43 : $revision.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.getId();
      return "SupermarketMember(id=" + var10000 + ", supermarketId=" + this.getSupermarketId() + ", psnType=" + this.getPsnType() + ", revision=" + this.getRevision() + ", crby=" + this.getCrby() + ", crtime=" + String.valueOf(this.getCrtime()) + ", upby=" + this.getUpby() + ", uptime=" + String.valueOf(this.getUptime()) + ")";
   }

   public SupermarketMember() {
   }
}
