ResourceDomain.java 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package com.yaozhitech.spring5.model;
  2. import java.io.Serializable;
  3. import java.time.LocalDateTime;
  4. import com.baomidou.mybatisplus.annotation.IdType;
  5. import com.baomidou.mybatisplus.annotation.TableId;
  6. import com.baomidou.mybatisplus.annotation.TableName;
  7. import io.swagger.annotations.ApiModel;
  8. import io.swagger.annotations.ApiModelProperty;
  9. import lombok.Data;
  10. import lombok.experimental.Accessors;
  11. /**
  12. * <p>
  13. * 权限
  14. * </p>
  15. *
  16. * @author zeda
  17. * @since 2019-12-15
  18. */
  19. @Data
  20. @Accessors(chain = true)
  21. @TableName("sys_resource")
  22. @ApiModel(value="ResourceDomain对象", description="权限")
  23. public class ResourceDomain implements Serializable {
  24. private static final long serialVersionUID = 1L;
  25. @TableId(value = "id", type = IdType.AUTO)
  26. private Integer id;
  27. private String resourceUuid;
  28. private Integer type;
  29. @ApiModelProperty(value = "父类")
  30. private Integer pid;
  31. @ApiModelProperty(value = "资源名")
  32. private String name;
  33. private String code;
  34. private String url;
  35. @ApiModelProperty(value = "排序")
  36. private Integer rank;
  37. @ApiModelProperty(value = "图标")
  38. private String logo;
  39. private LocalDateTime ctime;
  40. private LocalDateTime utime;
  41. private String creator;
  42. private String updator;
  43. private Integer isactive;
  44. @Override
  45. public boolean equals(Object obj) {
  46. if (this == obj)
  47. return true;
  48. if (obj == null)
  49. return false;
  50. if (getClass() != obj.getClass())
  51. return false;
  52. ResourceDomain other = (ResourceDomain) obj;
  53. if (id == null) {
  54. if (other.id != null)
  55. return false;
  56. } else if (!id.equals(other.id))
  57. return false;
  58. if (resourceUuid == null) {
  59. if (other.resourceUuid != null)
  60. return false;
  61. } else if (!resourceUuid.equals(other.resourceUuid))
  62. return false;
  63. return true;
  64. }
  65. @Override
  66. public int hashCode() {
  67. final int prime = 31;
  68. int result = 1;
  69. result = prime * result + ((id == null) ? 0 : id.hashCode());
  70. result = prime * result + ((resourceUuid == null) ? 0 : resourceUuid.hashCode());
  71. return result;
  72. }
  73. }