|
@@ -0,0 +1,229 @@
|
|
|
+package com.example.course.user.domain;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.annotation.IdType;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
+import java.io.Serializable;
|
|
|
+import java.util.Date;
|
|
|
+import lombok.Data;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 微信用户表
|
|
|
+ * @TableName wechat_user
|
|
|
+ */
|
|
|
+@TableName(value ="wechat_user")
|
|
|
+@Data
|
|
|
+public class WechatUser implements Serializable {
|
|
|
+ /**
|
|
|
+ * 主键ID
|
|
|
+ */
|
|
|
+ @TableId(type = IdType.AUTO)
|
|
|
+ private Long wechatId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 微信开放ID(应用唯一)
|
|
|
+ */
|
|
|
+ private String openid;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 微信联合ID(跨应用唯一)
|
|
|
+ */
|
|
|
+ private String unionid;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 微信应用ID
|
|
|
+ */
|
|
|
+ private String appId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 微信昵称
|
|
|
+ */
|
|
|
+ private String nickname;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 微信头像
|
|
|
+ */
|
|
|
+ private String avatarUrl;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 性别(0:未知 1:男 2:女)
|
|
|
+ */
|
|
|
+ private Integer gender;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 国家
|
|
|
+ */
|
|
|
+ private String country;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 省份
|
|
|
+ */
|
|
|
+ private String province;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 城市
|
|
|
+ */
|
|
|
+ private String city;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 语言
|
|
|
+ */
|
|
|
+ private String language;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 小程序会话密钥
|
|
|
+ */
|
|
|
+ private String sessionKey;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 访问令牌
|
|
|
+ */
|
|
|
+ private String accessToken;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 刷新令牌
|
|
|
+ */
|
|
|
+ private String refreshToken;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 令牌过期时间(秒)
|
|
|
+ */
|
|
|
+ private Integer expiresIn;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 绑定手机号
|
|
|
+ */
|
|
|
+ private String mobile;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 绑定邮箱
|
|
|
+ */
|
|
|
+ private String email;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 状态(0:禁用 1:正常)
|
|
|
+ */
|
|
|
+ private Integer status;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 最后登录时间
|
|
|
+ */
|
|
|
+ private Date lastLoginTime;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 最后登录IP
|
|
|
+ */
|
|
|
+ private String lastLoginIp;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 创建时间
|
|
|
+ */
|
|
|
+ private Date createTime;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新时间
|
|
|
+ */
|
|
|
+ private Date updateTime;
|
|
|
+
|
|
|
+ @TableField(exist = false)
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean equals(Object that) {
|
|
|
+ if (this == that) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (that == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (getClass() != that.getClass()) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ WechatUser other = (WechatUser) that;
|
|
|
+ return (this.getWechatId() == null ? other.getWechatId() == null : this.getWechatId().equals(other.getWechatId()))
|
|
|
+ && (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid()))
|
|
|
+ && (this.getUnionid() == null ? other.getUnionid() == null : this.getUnionid().equals(other.getUnionid()))
|
|
|
+ && (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
|
|
|
+ && (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
|
|
|
+ && (this.getAvatarUrl() == null ? other.getAvatarUrl() == null : this.getAvatarUrl().equals(other.getAvatarUrl()))
|
|
|
+ && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
|
|
|
+ && (this.getCountry() == null ? other.getCountry() == null : this.getCountry().equals(other.getCountry()))
|
|
|
+ && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
|
|
|
+ && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
|
|
|
+ && (this.getLanguage() == null ? other.getLanguage() == null : this.getLanguage().equals(other.getLanguage()))
|
|
|
+ && (this.getSessionKey() == null ? other.getSessionKey() == null : this.getSessionKey().equals(other.getSessionKey()))
|
|
|
+ && (this.getAccessToken() == null ? other.getAccessToken() == null : this.getAccessToken().equals(other.getAccessToken()))
|
|
|
+ && (this.getRefreshToken() == null ? other.getRefreshToken() == null : this.getRefreshToken().equals(other.getRefreshToken()))
|
|
|
+ && (this.getExpiresIn() == null ? other.getExpiresIn() == null : this.getExpiresIn().equals(other.getExpiresIn()))
|
|
|
+ && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
|
|
|
+ && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
|
|
|
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
|
|
+ && (this.getLastLoginTime() == null ? other.getLastLoginTime() == null : this.getLastLoginTime().equals(other.getLastLoginTime()))
|
|
|
+ && (this.getLastLoginIp() == null ? other.getLastLoginIp() == null : this.getLastLoginIp().equals(other.getLastLoginIp()))
|
|
|
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
|
|
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ final int prime = 31;
|
|
|
+ int result = 1;
|
|
|
+ result = prime * result + ((getWechatId() == null) ? 0 : getWechatId().hashCode());
|
|
|
+ result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode());
|
|
|
+ result = prime * result + ((getUnionid() == null) ? 0 : getUnionid().hashCode());
|
|
|
+ result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
|
|
|
+ result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
|
|
|
+ result = prime * result + ((getAvatarUrl() == null) ? 0 : getAvatarUrl().hashCode());
|
|
|
+ result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
|
|
|
+ result = prime * result + ((getCountry() == null) ? 0 : getCountry().hashCode());
|
|
|
+ result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
|
|
|
+ result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
|
|
|
+ result = prime * result + ((getLanguage() == null) ? 0 : getLanguage().hashCode());
|
|
|
+ result = prime * result + ((getSessionKey() == null) ? 0 : getSessionKey().hashCode());
|
|
|
+ result = prime * result + ((getAccessToken() == null) ? 0 : getAccessToken().hashCode());
|
|
|
+ result = prime * result + ((getRefreshToken() == null) ? 0 : getRefreshToken().hashCode());
|
|
|
+ result = prime * result + ((getExpiresIn() == null) ? 0 : getExpiresIn().hashCode());
|
|
|
+ result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
|
|
|
+ result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
|
|
|
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
|
|
+ result = prime * result + ((getLastLoginTime() == null) ? 0 : getLastLoginTime().hashCode());
|
|
|
+ result = prime * result + ((getLastLoginIp() == null) ? 0 : getLastLoginIp().hashCode());
|
|
|
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
|
|
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ sb.append(getClass().getSimpleName());
|
|
|
+ sb.append(" [");
|
|
|
+ sb.append("Hash = ").append(hashCode());
|
|
|
+ sb.append(", wechatId=").append(wechatId);
|
|
|
+ sb.append(", openid=").append(openid);
|
|
|
+ sb.append(", unionid=").append(unionid);
|
|
|
+ sb.append(", appId=").append(appId);
|
|
|
+ sb.append(", nickname=").append(nickname);
|
|
|
+ sb.append(", avatarUrl=").append(avatarUrl);
|
|
|
+ sb.append(", gender=").append(gender);
|
|
|
+ sb.append(", country=").append(country);
|
|
|
+ sb.append(", province=").append(province);
|
|
|
+ sb.append(", city=").append(city);
|
|
|
+ sb.append(", language=").append(language);
|
|
|
+ sb.append(", sessionKey=").append(sessionKey);
|
|
|
+ sb.append(", accessToken=").append(accessToken);
|
|
|
+ sb.append(", refreshToken=").append(refreshToken);
|
|
|
+ sb.append(", expiresIn=").append(expiresIn);
|
|
|
+ sb.append(", mobile=").append(mobile);
|
|
|
+ sb.append(", email=").append(email);
|
|
|
+ sb.append(", status=").append(status);
|
|
|
+ sb.append(", lastLoginTime=").append(lastLoginTime);
|
|
|
+ sb.append(", lastLoginIp=").append(lastLoginIp);
|
|
|
+ sb.append(", createTime=").append(createTime);
|
|
|
+ sb.append(", updateTime=").append(updateTime);
|
|
|
+ sb.append(", serialVersionUID=").append(serialVersionUID);
|
|
|
+ sb.append("]");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+}
|