UserShouye.java 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package com.zhentao.user.domain;
  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 com.fasterxml.jackson.annotation.JsonFormat;
  8. import lombok.Data;
  9. /**
  10. * 用户首页表
  11. * @TableName user_shouye
  12. */
  13. @TableName(value ="user_shouye")
  14. @Data
  15. public class UserShouye implements Serializable {
  16. /**
  17. * 主键
  18. */
  19. @TableId
  20. @JsonFormat(shape = JsonFormat.Shape.STRING)
  21. private Long id;
  22. /**
  23. * 用户1
  24. */
  25. @JsonFormat(shape = JsonFormat.Shape.STRING)
  26. private Long uid1;
  27. /**
  28. * 用户2
  29. */
  30. @JsonFormat(shape = JsonFormat.Shape.STRING)
  31. private Long uid2;
  32. /**
  33. * 群id
  34. */
  35. @JsonFormat(shape = JsonFormat.Shape.STRING)
  36. private Long gid;
  37. /**
  38. * 状态0 1
  39. */
  40. private Integer status;
  41. /**
  42. * 排序
  43. */
  44. private Integer sort;
  45. @TableField(exist = false)
  46. private static final long serialVersionUID = 1L;
  47. @Override
  48. public boolean equals(Object that) {
  49. if (this == that) {
  50. return true;
  51. }
  52. if (that == null) {
  53. return false;
  54. }
  55. if (getClass() != that.getClass()) {
  56. return false;
  57. }
  58. UserShouye other = (UserShouye) that;
  59. return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
  60. && (this.getUid1() == null ? other.getUid1() == null : this.getUid1().equals(other.getUid1()))
  61. && (this.getUid2() == null ? other.getUid2() == null : this.getUid2().equals(other.getUid2()))
  62. && (this.getGid() == null ? other.getGid() == null : this.getGid().equals(other.getGid()))
  63. && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
  64. && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()));
  65. }
  66. @Override
  67. public int hashCode() {
  68. final int prime = 31;
  69. int result = 1;
  70. result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
  71. result = prime * result + ((getUid1() == null) ? 0 : getUid1().hashCode());
  72. result = prime * result + ((getUid2() == null) ? 0 : getUid2().hashCode());
  73. result = prime * result + ((getGid() == null) ? 0 : getGid().hashCode());
  74. result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
  75. result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
  76. return result;
  77. }
  78. @Override
  79. public String toString() {
  80. StringBuilder sb = new StringBuilder();
  81. sb.append(getClass().getSimpleName());
  82. sb.append(" [");
  83. sb.append("Hash = ").append(hashCode());
  84. sb.append(", id=").append(id);
  85. sb.append(", uid1=").append(uid1);
  86. sb.append(", uid2=").append(uid2);
  87. sb.append(", gid=").append(gid);
  88. sb.append(", status=").append(status);
  89. sb.append(", sort=").append(sort);
  90. sb.append(", serialVersionUID=").append(serialVersionUID);
  91. sb.append("]");
  92. return sb.toString();
  93. }
  94. }