TUser.java 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. package com.futu.goose.user.pojo;
  2. import com.baomidou.mybatisplus.annotation.IdType;
  3. import com.baomidou.mybatisplus.annotation.TableField;
  4. import com.baomidou.mybatisplus.annotation.TableId;
  5. import com.baomidou.mybatisplus.annotation.TableName;
  6. import java.io.Serializable;
  7. import java.util.Date;
  8. /**
  9. * 基础用户表
  10. * @TableName t_user
  11. */
  12. @TableName(value ="t_user")
  13. public class TUser implements Serializable {
  14. /**
  15. * 用户ID,主键
  16. */
  17. @TableId
  18. private Long id;
  19. /**
  20. * 用户名
  21. */
  22. private String username;
  23. /**
  24. * 盐值
  25. */
  26. private String salt;
  27. public String getCode() {
  28. return code;
  29. }
  30. public void setCode(String code) {
  31. this.code = code;
  32. }
  33. // 添加无参构造函数
  34. public TUser() {
  35. }
  36. public TUser(String code) {
  37. this.code = code;
  38. }
  39. /**
  40. * 验证码
  41. */
  42. @TableField(exist = false)
  43. private String code;
  44. /**
  45. * 密码(加密存储)
  46. */
  47. private String password;
  48. /**
  49. * 邮箱
  50. */
  51. private String email;
  52. /**
  53. * 手机号
  54. */
  55. private String phone;
  56. /**
  57. * 昵称
  58. */
  59. private String nickname;
  60. /**
  61. * 头像URL
  62. */
  63. private String avatar;
  64. /**
  65. * 性别(0-未知 1-男 2-女)
  66. */
  67. private Integer gender;
  68. /**
  69. * 生日
  70. */
  71. private Date birthday;
  72. /**
  73. * 状态(0-禁用 1-正常)
  74. */
  75. private Integer status;
  76. /**
  77. * 最后登录时间
  78. */
  79. private Date lastLoginTime;
  80. /**
  81. * 最后登录IP
  82. */
  83. private String lastLoginIp;
  84. /**
  85. * 创建时间
  86. */
  87. private Date createdTime;
  88. /**
  89. * 更新时间
  90. */
  91. private Date updatedTime;
  92. @TableField(exist = false)
  93. private static final long serialVersionUID = 1L;
  94. /**
  95. * 用户ID,主键
  96. */
  97. public Long getId() {
  98. return id;
  99. }
  100. /**
  101. * 用户ID,主键
  102. */
  103. public void setId(Long id) {
  104. this.id = id;
  105. }
  106. /**
  107. * 用户名
  108. */
  109. public String getUsername() {
  110. return username;
  111. }
  112. /**
  113. * 用户名
  114. */
  115. public void setUsername(String username) {
  116. this.username = username;
  117. }
  118. /**
  119. * 盐值
  120. */
  121. public String getSalt() {
  122. return salt;
  123. }
  124. /**
  125. * 盐值
  126. */
  127. public void setSalt(String salt) {
  128. this.salt = salt;
  129. }
  130. /**
  131. * 密码(加密存储)
  132. */
  133. public String getPassword() {
  134. return password;
  135. }
  136. /**
  137. * 密码(加密存储)
  138. */
  139. public void setPassword(String password) {
  140. this.password = password;
  141. }
  142. /**
  143. * 邮箱
  144. */
  145. public String getEmail() {
  146. return email;
  147. }
  148. /**
  149. * 邮箱
  150. */
  151. public void setEmail(String email) {
  152. this.email = email;
  153. }
  154. /**
  155. * 手机号
  156. */
  157. public String getPhone() {
  158. return phone;
  159. }
  160. /**
  161. * 手机号
  162. */
  163. public void setPhone(String phone) {
  164. this.phone = phone;
  165. }
  166. /**
  167. * 昵称
  168. */
  169. public String getNickname() {
  170. return nickname;
  171. }
  172. /**
  173. * 昵称
  174. */
  175. public void setNickname(String nickname) {
  176. this.nickname = nickname;
  177. }
  178. /**
  179. * 头像URL
  180. */
  181. public String getAvatar() {
  182. return avatar;
  183. }
  184. /**
  185. * 头像URL
  186. */
  187. public void setAvatar(String avatar) {
  188. this.avatar = avatar;
  189. }
  190. /**
  191. * 性别(0-未知 1-男 2-女)
  192. */
  193. public Integer getGender() {
  194. return gender;
  195. }
  196. /**
  197. * 性别(0-未知 1-男 2-女)
  198. */
  199. public void setGender(Integer gender) {
  200. this.gender = gender;
  201. }
  202. /**
  203. * 生日
  204. */
  205. public Date getBirthday() {
  206. return birthday;
  207. }
  208. /**
  209. * 生日
  210. */
  211. public void setBirthday(Date birthday) {
  212. this.birthday = birthday;
  213. }
  214. /**
  215. * 状态(0-禁用 1-正常)
  216. */
  217. public Integer getStatus() {
  218. return status;
  219. }
  220. /**
  221. * 状态(0-禁用 1-正常)
  222. */
  223. public void setStatus(Integer status) {
  224. this.status = status;
  225. }
  226. /**
  227. * 最后登录时间
  228. */
  229. public Date getLastLoginTime() {
  230. return lastLoginTime;
  231. }
  232. /**
  233. * 最后登录时间
  234. */
  235. public void setLastLoginTime(Date lastLoginTime) {
  236. this.lastLoginTime = lastLoginTime;
  237. }
  238. /**
  239. * 最后登录IP
  240. */
  241. public String getLastLoginIp() {
  242. return lastLoginIp;
  243. }
  244. /**
  245. * 最后登录IP
  246. */
  247. public void setLastLoginIp(String lastLoginIp) {
  248. this.lastLoginIp = lastLoginIp;
  249. }
  250. /**
  251. * 创建时间
  252. */
  253. public Date getCreatedTime() {
  254. return createdTime;
  255. }
  256. /**
  257. * 创建时间
  258. */
  259. public void setCreatedTime(Date createdTime) {
  260. this.createdTime = createdTime;
  261. }
  262. /**
  263. * 更新时间
  264. */
  265. public Date getUpdatedTime() {
  266. return updatedTime;
  267. }
  268. /**
  269. * 更新时间
  270. */
  271. public void setUpdatedTime(Date updatedTime) {
  272. this.updatedTime = updatedTime;
  273. }
  274. @Override
  275. public boolean equals(Object that) {
  276. if (this == that) {
  277. return true;
  278. }
  279. if (that == null) {
  280. return false;
  281. }
  282. if (getClass() != that.getClass()) {
  283. return false;
  284. }
  285. TUser other = (TUser) that;
  286. return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
  287. && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
  288. && (this.getSalt() == null ? other.getSalt() == null : this.getSalt().equals(other.getSalt()))
  289. && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
  290. && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
  291. && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
  292. && (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
  293. && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
  294. && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
  295. && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
  296. && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
  297. && (this.getLastLoginTime() == null ? other.getLastLoginTime() == null : this.getLastLoginTime().equals(other.getLastLoginTime()))
  298. && (this.getLastLoginIp() == null ? other.getLastLoginIp() == null : this.getLastLoginIp().equals(other.getLastLoginIp()))
  299. && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()))
  300. && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime()));
  301. }
  302. @Override
  303. public int hashCode() {
  304. final int prime = 31;
  305. int result = 1;
  306. result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
  307. result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
  308. result = prime * result + ((getSalt() == null) ? 0 : getSalt().hashCode());
  309. result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
  310. result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
  311. result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
  312. result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
  313. result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
  314. result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
  315. result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
  316. result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
  317. result = prime * result + ((getLastLoginTime() == null) ? 0 : getLastLoginTime().hashCode());
  318. result = prime * result + ((getLastLoginIp() == null) ? 0 : getLastLoginIp().hashCode());
  319. result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
  320. result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode());
  321. return result;
  322. }
  323. @Override
  324. public String toString() {
  325. StringBuilder sb = new StringBuilder();
  326. sb.append(getClass().getSimpleName());
  327. sb.append(" [");
  328. sb.append("Hash = ").append(hashCode());
  329. sb.append(", id=").append(id);
  330. sb.append(", username=").append(username);
  331. sb.append(", salt=").append(salt);
  332. sb.append(", password=").append(password);
  333. sb.append(", email=").append(email);
  334. sb.append(", phone=").append(phone);
  335. sb.append(", nickname=").append(nickname);
  336. sb.append(", avatar=").append(avatar);
  337. sb.append(", gender=").append(gender);
  338. sb.append(", birthday=").append(birthday);
  339. sb.append(", status=").append(status);
  340. sb.append(", lastLoginTime=").append(lastLoginTime);
  341. sb.append(", lastLoginIp=").append(lastLoginIp);
  342. sb.append(", createdTime=").append(createdTime);
  343. sb.append(", updatedTime=").append(updatedTime);
  344. sb.append(", serialVersionUID=").append(serialVersionUID);
  345. sb.append("]");
  346. return sb.toString();
  347. }
  348. }