package com.shanghaichengdi.ghjgitem.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * @TableName SYS_DATASHARE_AUTH_NEW
 */
@TableName(value = "SYS_DATASHARE_AUTH_NEW")
@Data
public class SysDatashareAuthNew implements Serializable {

  @TableField(exist = false)
  private static final long serialVersionUID = 1L;
  /**
   *
   */
  @TableField(value = "USERID")
  private Long userid;
  /**
   *
   */
  @TableField(value = "SERVICEID")
  private Long serviceid;
  /**
   *
   */
  @TableField(value = "DEFAULTPARAMS")
  private String defaultparams;

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    SysDatashareAuthNew other = (SysDatashareAuthNew) that;
    return (this.getUserid() == null ? other.getUserid() == null
        : this.getUserid().equals(other.getUserid()))
        && (this.getServiceid() == null ? other.getServiceid() == null
        : this.getServiceid().equals(other.getServiceid()))
        && (this.getDefaultparams() == null ? other.getDefaultparams() == null
        : this.getDefaultparams().equals(other.getDefaultparams()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
    result = prime * result + ((getServiceid() == null) ? 0 : getServiceid().hashCode());
    result = prime * result + ((getDefaultparams() == null) ? 0 : getDefaultparams().hashCode());
    return result;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName());
    sb.append(" [");
    sb.append("Hash = ").append(hashCode());
    sb.append(", userid=").append(userid);
    sb.append(", serviceid=").append(serviceid);
    sb.append(", defaultparams=").append(defaultparams);
    sb.append(", serialVersionUID=").append(serialVersionUID);
    sb.append("]");
    return sb.toString();
  }
}