DgEquipmentAlarm.java 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. package com.zksy.pole.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 dg_equipment_alarm
  12. */
  13. @TableName(value ="dg_equipment_alarm")
  14. @Data
  15. public class DgEquipmentAlarm implements Serializable {
  16. /**
  17. * 主键
  18. */
  19. @TableId
  20. private String id;
  21. /**
  22. * cmd
  23. */
  24. private Long cmd;
  25. /**
  26. * 时间
  27. */
  28. private Date dateTime;
  29. /**
  30. * 网络设备为ip地址,非网络设备没有此字段
  31. */
  32. private String ip;
  33. /**
  34. * 网络设备为ip主机名称,串口设备为因子名
  35. */
  36. private String deviceName;
  37. /**
  38. * 1:摄像头 2:信息发布屏 3:网络广播 4:一键求助 5无线AP 6充电桩 7其它网络1 8其它网络2 9 串口设备
  39. */
  40. private String type;
  41. /**
  42. * 1:设备上线 0:设备离线
  43. */
  44. private String status;
  45. /**
  46. * 创建者
  47. */
  48. private String createBy;
  49. /**
  50. * 创建时间
  51. */
  52. private Date createTime;
  53. /**
  54. * 更新者
  55. */
  56. private String updateBy;
  57. /**
  58. * 更新时间
  59. */
  60. private Date updateTime;
  61. @TableField(exist = false)
  62. private static final long serialVersionUID = 1L;
  63. @Override
  64. public boolean equals(Object that) {
  65. if (this == that) {
  66. return true;
  67. }
  68. if (that == null) {
  69. return false;
  70. }
  71. if (getClass() != that.getClass()) {
  72. return false;
  73. }
  74. DgEquipmentAlarm other = (DgEquipmentAlarm) that;
  75. return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
  76. && (this.getCmd() == null ? other.getCmd() == null : this.getCmd().equals(other.getCmd()))
  77. && (this.getDateTime() == null ? other.getDateTime() == null : this.getDateTime().equals(other.getDateTime()))
  78. && (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
  79. && (this.getDeviceName() == null ? other.getDeviceName() == null : this.getDeviceName().equals(other.getDeviceName()))
  80. && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
  81. && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
  82. && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
  83. && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
  84. && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
  85. && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
  86. }
  87. @Override
  88. public int hashCode() {
  89. final int prime = 31;
  90. int result = 1;
  91. result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
  92. result = prime * result + ((getCmd() == null) ? 0 : getCmd().hashCode());
  93. result = prime * result + ((getDateTime() == null) ? 0 : getDateTime().hashCode());
  94. result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
  95. result = prime * result + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode());
  96. result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
  97. result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
  98. result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
  99. result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
  100. result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
  101. result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
  102. return result;
  103. }
  104. @Override
  105. public String toString() {
  106. StringBuilder sb = new StringBuilder();
  107. sb.append(getClass().getSimpleName());
  108. sb.append(" [");
  109. sb.append("Hash = ").append(hashCode());
  110. sb.append(", id=").append(id);
  111. sb.append(", cmd=").append(cmd);
  112. sb.append(", dateTime=").append(dateTime);
  113. sb.append(", ip=").append(ip);
  114. sb.append(", deviceName=").append(deviceName);
  115. sb.append(", type=").append(type);
  116. sb.append(", status=").append(status);
  117. sb.append(", createBy=").append(createBy);
  118. sb.append(", createTime=").append(createTime);
  119. sb.append(", updateBy=").append(updateBy);
  120. sb.append(", updateTime=").append(updateTime);
  121. sb.append(", serialVersionUID=").append(serialVersionUID);
  122. sb.append("]");
  123. return sb.toString();
  124. }
  125. }