package com.shanghaichengdi.ghjgitem.domain;

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

/**
 * 数据共享用户表_20240527
 *
 * @TableName SYS_DATASHARE_USER
 */
@TableName(value = "GHJG_BASICS.SYS_DATASHARE_USER")
@Data
public class SysDatashareUser implements Serializable {

  @TableField(exist = false)
  private static final long serialVersionUID = 1L;
  /**
   * id
   */
  @TableField(value = "ID")
  private String id;
  /**
   * 提供给三方调用获取token的参数
   */
  @TableField(value = "KEY")
  private String key;
  /**
   * 提供给三方调用获取token的参数
   */
  @TableField(value = "SECRET")
  private String secret;
  /**
   * 三方客户名称
   */
  @TableField(value = "CLIENT")
  private String client;
  /**
   * 是否可用：1可用；0不可用；
   */
  @TableField(value = "ISVALID")
  private Long isvalid;
  /**
   * 创建时间
   */
  @TableField(value = "CREATETIME")
  private Date createtime;
  /**
   * 令牌
   */
  @TableField(value = "TOKEN")
  private String token;
  /**
   * 创建时间
   */
  @TableField(value = "UPDATETIME")
  private Date updateTime;

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    SysDatashareUser other = (SysDatashareUser) that;
    return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
        && (this.getKey() == null ? other.getKey() == null : this.getKey().equals(other.getKey()))
        && (this.getSecret() == null ? other.getSecret() == null
        : this.getSecret().equals(other.getSecret()))
        && (this.getClient() == null ? other.getClient() == null
        : this.getClient().equals(other.getClient()))
        && (this.getIsvalid() == null ? other.getIsvalid() == null
        : this.getIsvalid().equals(other.getIsvalid()))
        && (this.getCreatetime() == null ? other.getCreatetime() == null
        : this.getCreatetime().equals(other.getCreatetime()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
    result = prime * result + ((getKey() == null) ? 0 : getKey().hashCode());
    result = prime * result + ((getSecret() == null) ? 0 : getSecret().hashCode());
    result = prime * result + ((getClient() == null) ? 0 : getClient().hashCode());
    result = prime * result + ((getIsvalid() == null) ? 0 : getIsvalid().hashCode());
    result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
    return result;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName());
    sb.append(" [");
    sb.append("Hash = ").append(hashCode());
    sb.append(", id=").append(id);
    sb.append(", key=").append(key);
    sb.append(", secret=").append(secret);
    sb.append(", client=").append(client);
    sb.append(", isvalid=").append(isvalid);
    sb.append(", createtime=").append(createtime);
    sb.append(", serialVersionUID=").append(serialVersionUID);
    sb.append("]");
    return sb.toString();
  }
}