ScreenControl.java 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. package com.zksy.screen.domain.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 java.io.Serializable;
  7. import java.util.Date;
  8. import lombok.Data;
  9. /**
  10. * 大屏控制
  11. * @TableName screen_control
  12. */
  13. @TableName(value ="screen_control")
  14. @Data
  15. public class ScreenControl implements Serializable {
  16. /**
  17. * 主键
  18. */
  19. @TableId(type = IdType.AUTO)
  20. private Long id;
  21. /**
  22. * 资源路径
  23. */
  24. private String url;
  25. /**
  26. * 设备id
  27. */
  28. private String deviceId;
  29. /**
  30. * 状态 1-图片 2-视频
  31. */
  32. private Integer state;
  33. /**
  34. * 创建时间
  35. */
  36. private Date createTime;
  37. /**
  38. * 更新时间
  39. */
  40. private Date updateTime;
  41. @TableField(exist = false)
  42. private static final long serialVersionUID = 1L;
  43. @Override
  44. public boolean equals(Object that) {
  45. if (this == that) {
  46. return true;
  47. }
  48. if (that == null) {
  49. return false;
  50. }
  51. if (getClass() != that.getClass()) {
  52. return false;
  53. }
  54. ScreenControl other = (ScreenControl) that;
  55. return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
  56. && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
  57. && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
  58. && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
  59. && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
  60. && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
  61. }
  62. @Override
  63. public int hashCode() {
  64. final int prime = 31;
  65. int result = 1;
  66. result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
  67. result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
  68. result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
  69. result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
  70. result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
  71. result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
  72. return result;
  73. }
  74. @Override
  75. public String toString() {
  76. StringBuilder sb = new StringBuilder();
  77. sb.append(getClass().getSimpleName());
  78. sb.append(" [");
  79. sb.append("Hash = ").append(hashCode());
  80. sb.append(", id=").append(id);
  81. sb.append(", url=").append(url);
  82. sb.append(", deviceId=").append(deviceId);
  83. sb.append(", state=").append(state);
  84. sb.append(", createTime=").append(createTime);
  85. sb.append(", updateTime=").append(updateTime);
  86. sb.append(", serialVersionUID=").append(serialVersionUID);
  87. sb.append("]");
  88. return sb.toString();
  89. }
  90. }