SysBusinessGrouping.java 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. package com.ydtech.modules.admin.model.po;
  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 lombok.Data;
  7. import java.io.Serializable;
  8. /**
  9. * 运营业务分组
  10. * @TableName sys_business_grouping
  11. */
  12. @TableName(value ="sys_business_grouping")
  13. @Data
  14. public class SysBusinessGrouping implements Serializable {
  15. /**
  16. * id
  17. */
  18. @TableId(value = "id", type = IdType.AUTO)
  19. private Integer id;
  20. /**
  21. * 分组编号
  22. */
  23. @TableField(value = "grouping_id")
  24. private Integer groupingId;
  25. /**
  26. * 用户id
  27. */
  28. @TableField(value = "user_id")
  29. private String userId;
  30. /**
  31. * 用户名称
  32. */
  33. @TableField(value = "user_name")
  34. private String userName;
  35. @TableField(exist = false)
  36. private static final long serialVersionUID = 1L;
  37. @Override
  38. public boolean equals(Object that) {
  39. if (this == that) {
  40. return true;
  41. }
  42. if (that == null) {
  43. return false;
  44. }
  45. if (getClass() != that.getClass()) {
  46. return false;
  47. }
  48. SysBusinessGrouping other = (SysBusinessGrouping) that;
  49. return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
  50. && (this.getGroupingId() == null ? other.getGroupingId() == null : this.getGroupingId().equals(other.getGroupingId()))
  51. && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
  52. && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()));
  53. }
  54. @Override
  55. public int hashCode() {
  56. final int prime = 31;
  57. int result = 1;
  58. result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
  59. result = prime * result + ((getGroupingId() == null) ? 0 : getGroupingId().hashCode());
  60. result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
  61. result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
  62. return result;
  63. }
  64. @Override
  65. public String toString() {
  66. StringBuilder sb = new StringBuilder();
  67. sb.append(getClass().getSimpleName());
  68. sb.append(" [");
  69. sb.append("Hash = ").append(hashCode());
  70. sb.append(", id=").append(id);
  71. sb.append(", groupingId=").append(groupingId);
  72. sb.append(", userId=").append(userId);
  73. sb.append(", userName=").append(userName);
  74. sb.append(", serialVersionUID=").append(serialVersionUID);
  75. sb.append("]");
  76. return sb.toString();
  77. }
  78. }