KztDataPermission.java 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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 io.swagger.annotations.ApiModel;
  7. import io.swagger.annotations.ApiModelProperty;
  8. import lombok.Data;
  9. import javax.validation.constraints.NotBlank;
  10. import javax.validation.constraints.NotNull;
  11. import java.io.Serializable;
  12. import java.util.Date;
  13. /**
  14. *
  15. * @TableName kzt_data_permission
  16. */
  17. @TableName(value ="kzt_data_permission")
  18. @Data
  19. @ApiModel(value = "数据权限")
  20. public class KztDataPermission implements Serializable {
  21. /**
  22. * 主键
  23. */
  24. @TableId(type = IdType.AUTO)
  25. @ApiModelProperty(value = "id")
  26. private Long id;
  27. /**
  28. * 菜单id
  29. */
  30. @ApiModelProperty(value = "菜单id")
  31. @NotNull(message = "菜单id不能为空")
  32. private Long menuId;
  33. /**
  34. * 是否自定义脚本
  35. */
  36. @ApiModelProperty(value = "是否自定义脚本")
  37. @NotNull(message = "是否自定义脚本不能为空")
  38. private Integer customScriptFlag;
  39. /**
  40. * 数据权限字典id
  41. */
  42. @ApiModelProperty(value = "数据权限字典id")
  43. private String dataPermissionId;
  44. /**
  45. * 自定义脚本内容
  46. */
  47. @ApiModelProperty(value = "自定义脚本内容")
  48. private String scriptContent;
  49. /**
  50. * 创建时间
  51. */
  52. @ApiModelProperty(value = "不用传后台生成")
  53. private Date createTime;
  54. /**
  55. * 访问的url
  56. */
  57. @NotBlank(message = "访问的url不能为空")
  58. @ApiModelProperty(value = "访问的url")
  59. private String url;
  60. @TableField(exist = false)
  61. private static final long serialVersionUID = 1L;
  62. @Override
  63. public boolean equals(Object that) {
  64. if (this == that) {
  65. return true;
  66. }
  67. if (that == null) {
  68. return false;
  69. }
  70. if (getClass() != that.getClass()) {
  71. return false;
  72. }
  73. KztDataPermission other = (KztDataPermission) that;
  74. return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
  75. && (this.getMenuId() == null ? other.getMenuId() == null : this.getMenuId().equals(other.getMenuId()))
  76. && (this.getCustomScriptFlag() == null ? other.getCustomScriptFlag() == null : this.getCustomScriptFlag().equals(other.getCustomScriptFlag()))
  77. && (this.getDataPermissionId() == null ? other.getDataPermissionId() == null : this.getDataPermissionId().equals(other.getDataPermissionId()))
  78. && (this.getScriptContent() == null ? other.getScriptContent() == null : this.getScriptContent().equals(other.getScriptContent()))
  79. && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
  80. && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
  81. }
  82. @Override
  83. public int hashCode() {
  84. final int prime = 31;
  85. int result = 1;
  86. result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
  87. result = prime * result + ((getMenuId() == null) ? 0 : getMenuId().hashCode());
  88. result = prime * result + ((getCustomScriptFlag() == null) ? 0 : getCustomScriptFlag().hashCode());
  89. result = prime * result + ((getDataPermissionId() == null) ? 0 : getDataPermissionId().hashCode());
  90. result = prime * result + ((getScriptContent() == null) ? 0 : getScriptContent().hashCode());
  91. result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
  92. result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
  93. return result;
  94. }
  95. @Override
  96. public String toString() {
  97. StringBuilder sb = new StringBuilder();
  98. sb.append(getClass().getSimpleName());
  99. sb.append(" [");
  100. sb.append("Hash = ").append(hashCode());
  101. sb.append(", id=").append(id);
  102. sb.append(", menuId=").append(menuId);
  103. sb.append(", customScriptFlag=").append(customScriptFlag);
  104. sb.append(", dataPermissionId=").append(dataPermissionId);
  105. sb.append(", scriptContent=").append(scriptContent);
  106. sb.append(", createTime=").append(createTime);
  107. sb.append(", url=").append(url);
  108. sb.append(", serialVersionUID=").append(serialVersionUID);
  109. sb.append("]");
  110. return sb.toString();
  111. }
  112. }