MyResource.java 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. package com.zhentao.entity;
  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 com.fasterxml.jackson.annotation.JsonProperty;
  7. import java.io.Serializable;
  8. import java.util.Date;
  9. import lombok.Data;
  10. /**
  11. * 红娘资源表
  12. * @TableName my_resource
  13. */
  14. @TableName(value ="my_resource")
  15. @Data
  16. public class MyResource implements Serializable {
  17. /**
  18. * 资源id
  19. */
  20. @TableId(value = "resource_id", type = IdType.AUTO)
  21. private Integer resourceId;
  22. /**
  23. * 红娘id
  24. */
  25. private Integer matchmakerId;
  26. /**
  27. * 名称
  28. */
  29. private String name;
  30. /**
  31. * 年龄
  32. */
  33. private Integer age;
  34. /**
  35. * 性别(1:男,2:女)
  36. */
  37. private Integer gender;
  38. /**
  39. * 星座
  40. */
  41. private String constellation;
  42. /**
  43. * 身高
  44. */
  45. private Integer height;
  46. /**
  47. * 体重
  48. */
  49. private Integer weight;
  50. /**
  51. * 婚姻状况(0-未婚,1-离异,2-丧偶)
  52. */
  53. @TableField(value = "marr_status", insertStrategy = com.baomidou.mybatisplus.annotation.FieldStrategy.IGNORED)
  54. @JsonProperty("marrStatus") // 明确指定JSON字段名为驼峰命名,避免SNAKE_CASE转换
  55. private Integer marrStatus;
  56. /**
  57. * 学历('高中', '专科', '本科', '硕士', '博士', '无')
  58. */
  59. private String diploma;
  60. /**
  61. * 收入('1-5k', '5-10k', '10-20k', '20-50k', '50k+')
  62. */
  63. private String income;
  64. /**
  65. * 住址
  66. */
  67. private String address;
  68. /**
  69. * 户籍所在地
  70. */
  71. private String domicile;
  72. /**
  73. * 职业
  74. */
  75. private String occupation;
  76. /**
  77. * 购房(0:无,1:有)
  78. */
  79. private Integer house;
  80. /**
  81. * 手机号
  82. */
  83. private String phone;
  84. /**
  85. * 备用手机号
  86. */
  87. @TableField(value = "backup_phone", insertStrategy = com.baomidou.mybatisplus.annotation.FieldStrategy.IGNORED)
  88. @JsonProperty("backupPhone") // 明确指定JSON字段名为驼峰命名,避免SNAKE_CASE转换
  89. private String backupPhone;
  90. /**
  91. * 购车(0:无,1:有)
  92. */
  93. private Integer car;
  94. /**
  95. * 择偶标准
  96. */
  97. @TableField(value = "mate_selection_criteria", insertStrategy = com.baomidou.mybatisplus.annotation.FieldStrategy.IGNORED)
  98. @JsonProperty("mateSelectionCriteria") // 明确指定JSON字段名为驼峰命名,避免SNAKE_CASE转换
  99. private String mateSelectionCriteria;
  100. /**
  101. * 是否为系统用户(0:否,1:是)
  102. */
  103. @TableField("is_user")
  104. private Integer isUser;
  105. /**
  106. * 用户ID(关联users表的user_id)
  107. */
  108. @TableField("user_id")
  109. private Integer userId;
  110. /**
  111. * 审核状态(0:待审核,1:审核通过,2:审核失败)
  112. */
  113. @TableField("status")
  114. private Integer status;
  115. /**
  116. * 审核失败原因
  117. */
  118. @TableField(value = "reject_reason", insertStrategy = com.baomidou.mybatisplus.annotation.FieldStrategy.IGNORED)
  119. @JsonProperty("rejectReason")
  120. private String rejectReason;
  121. /**
  122. * 奖励积分(用于后台开发人员计算红娘积分)
  123. */
  124. @TableField(value = "reward_points", insertStrategy = com.baomidou.mybatisplus.annotation.FieldStrategy.IGNORED)
  125. @JsonProperty("rewardPoints")
  126. private Integer rewardPoints;
  127. /**
  128. *
  129. */
  130. private Date createTime;
  131. /**
  132. *
  133. */
  134. private Date updateTime;
  135. @TableField(exist = false)
  136. private static final long serialVersionUID = 1L;
  137. @Override
  138. public boolean equals(Object that) {
  139. if (this == that) {
  140. return true;
  141. }
  142. if (that == null) {
  143. return false;
  144. }
  145. if (getClass() != that.getClass()) {
  146. return false;
  147. }
  148. MyResource other = (MyResource) that;
  149. return (this.getResourceId() == null ? other.getResourceId() == null : this.getResourceId().equals(other.getResourceId()))
  150. && (this.getMatchmakerId() == null ? other.getMatchmakerId() == null : this.getMatchmakerId().equals(other.getMatchmakerId()))
  151. && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
  152. && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
  153. && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
  154. && (this.getConstellation() == null ? other.getConstellation() == null : this.getConstellation().equals(other.getConstellation()))
  155. && (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()))
  156. && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
  157. && (this.getMarrStatus() == null ? other.getMarrStatus() == null : this.getMarrStatus().equals(other.getMarrStatus()))
  158. && (this.getDiploma() == null ? other.getDiploma() == null : this.getDiploma().equals(other.getDiploma()))
  159. && (this.getIncome() == null ? other.getIncome() == null : this.getIncome().equals(other.getIncome()))
  160. && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
  161. && (this.getDomicile() == null ? other.getDomicile() == null : this.getDomicile().equals(other.getDomicile()))
  162. && (this.getOccupation() == null ? other.getOccupation() == null : this.getOccupation().equals(other.getOccupation()))
  163. && (this.getHouse() == null ? other.getHouse() == null : this.getHouse().equals(other.getHouse()))
  164. && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
  165. && (this.getBackupPhone() == null ? other.getBackupPhone() == null : this.getBackupPhone().equals(other.getBackupPhone()))
  166. && (this.getCar() == null ? other.getCar() == null : this.getCar().equals(other.getCar()))
  167. && (this.getMateSelectionCriteria() == null ? other.getMateSelectionCriteria() == null : this.getMateSelectionCriteria().equals(other.getMateSelectionCriteria()))
  168. && (this.getIsUser() == null ? other.getIsUser() == null : this.getIsUser().equals(other.getIsUser()))
  169. && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
  170. && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
  171. && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
  172. }
  173. @Override
  174. public int hashCode() {
  175. final int prime = 31;
  176. int result = 1;
  177. result = prime * result + ((getResourceId() == null) ? 0 : getResourceId().hashCode());
  178. result = prime * result + ((getMatchmakerId() == null) ? 0 : getMatchmakerId().hashCode());
  179. result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
  180. result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
  181. result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
  182. result = prime * result + ((getConstellation() == null) ? 0 : getConstellation().hashCode());
  183. result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
  184. result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
  185. result = prime * result + ((getMarrStatus() == null) ? 0 : getMarrStatus().hashCode());
  186. result = prime * result + ((getDiploma() == null) ? 0 : getDiploma().hashCode());
  187. result = prime * result + ((getIncome() == null) ? 0 : getIncome().hashCode());
  188. result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
  189. result = prime * result + ((getDomicile() == null) ? 0 : getDomicile().hashCode());
  190. result = prime * result + ((getOccupation() == null) ? 0 : getOccupation().hashCode());
  191. result = prime * result + ((getHouse() == null) ? 0 : getHouse().hashCode());
  192. result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
  193. result = prime * result + ((getBackupPhone() == null) ? 0 : getBackupPhone().hashCode());
  194. result = prime * result + ((getCar() == null) ? 0 : getCar().hashCode());
  195. result = prime * result + ((getMateSelectionCriteria() == null) ? 0 : getMateSelectionCriteria().hashCode());
  196. result = prime * result + ((getIsUser() == null) ? 0 : getIsUser().hashCode());
  197. result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
  198. result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
  199. result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
  200. return result;
  201. }
  202. @Override
  203. public String toString() {
  204. StringBuilder sb = new StringBuilder();
  205. sb.append(getClass().getSimpleName());
  206. sb.append(" [");
  207. sb.append("Hash = ").append(hashCode());
  208. sb.append(", resourceId=").append(resourceId);
  209. sb.append(", matchmakerId=").append(matchmakerId);
  210. sb.append(", name=").append(name);
  211. sb.append(", age=").append(age);
  212. sb.append(", gender=").append(gender);
  213. sb.append(", constellation=").append(constellation);
  214. sb.append(", height=").append(height);
  215. sb.append(", weight=").append(weight);
  216. sb.append(", marrStatus=").append(marrStatus);
  217. sb.append(", diploma=").append(diploma);
  218. sb.append(", income=").append(income);
  219. sb.append(", address=").append(address);
  220. sb.append(", domicile=").append(domicile);
  221. sb.append(", occupation=").append(occupation);
  222. sb.append(", house=").append(house);
  223. sb.append(", phone=").append(phone);
  224. sb.append(", backupPhone=").append(backupPhone);
  225. sb.append(", car=").append(car);
  226. sb.append(", mateSelectionCriteria=").append(mateSelectionCriteria);
  227. sb.append(", isUser=").append(isUser);
  228. sb.append(", userId=").append(userId);
  229. sb.append(", createTime=").append(createTime);
  230. sb.append(", updateTime=").append(updateTime);
  231. sb.append(", serialVersionUID=").append(serialVersionUID);
  232. sb.append("]");
  233. return sb.toString();
  234. }
  235. }