package com.qianwen.smartman.modules.notify.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.Date; import com.qianwen.smartman.common.constant.DateConstant; import com.qianwen.core.mp.base.BaseEntity; import com.qianwen.core.tool.utils.BeanUtil; import com.qianwen.smartman.modules.notify.dto.Notification; import org.springframework.format.annotation.DateTimeFormat; @ApiModel(value = "通告", description = "通告,status: 1.已读 2.未读") @TableName("blade_notify_notifications") /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/entity/NotificationEntity.class */ public class NotificationEntity extends BaseEntity { @ApiModelProperty("订阅追溯ID") private String subscribeId; @ApiModelProperty("订阅者ID") private String subscriber; @ApiModelProperty("主题标识,如:device_alarm") private String businessKey; @ApiModelProperty("主题名称") private String businessName; @ApiModelProperty("通知消息内容") private String message; @ApiModelProperty("通知消息附件") private String attachments; @DateTimeFormat(pattern = DateConstant.PATTERN_DATE_TIME) @JsonFormat(pattern = DateConstant.PATTERN_DATE_TIME) @ApiModelProperty("通知时间") private Date notifyTime; @ApiModelProperty("说明") private String description; public void setSubscribeId(final String subscribeId) { this.subscribeId = subscribeId; } public void setSubscriber(final String subscriber) { this.subscriber = subscriber; } public void setBusinessKey(final String businessKey) { this.businessKey = businessKey; } public void setBusinessName(final String businessName) { this.businessName = businessName; } public void setMessage(final String message) { this.message = message; } public void setAttachments(final String attachments) { this.attachments = attachments; } @JsonFormat(pattern = DateConstant.PATTERN_DATE_TIME) public void setNotifyTime(final Date notifyTime) { this.notifyTime = notifyTime; } public void setDescription(final String description) { this.description = description; } public String toString() { return "NotificationEntity(subscribeId=" + getSubscribeId() + ", subscriber=" + getSubscriber() + ", businessKey=" + getBusinessKey() + ", businessName=" + getBusinessName() + ", message=" + getMessage() + ", attachments=" + getAttachments() + ", notifyTime=" + getNotifyTime() + ", description=" + getDescription() + ")"; } public boolean equals(final Object o) { if (o == this) { return true; } if (o instanceof NotificationEntity) { NotificationEntity other = (NotificationEntity) o; if (other.canEqual(this) && super.equals(o)) { Object this$subscribeId = getSubscribeId(); Object other$subscribeId = other.getSubscribeId(); if (this$subscribeId == null) { if (other$subscribeId != null) { return false; } } else if (!this$subscribeId.equals(other$subscribeId)) { return false; } Object this$subscriber = getSubscriber(); Object other$subscriber = other.getSubscriber(); if (this$subscriber == null) { if (other$subscriber != null) { return false; } } else if (!this$subscriber.equals(other$subscriber)) { return false; } Object this$businessKey = getBusinessKey(); Object other$businessKey = other.getBusinessKey(); if (this$businessKey == null) { if (other$businessKey != null) { return false; } } else if (!this$businessKey.equals(other$businessKey)) { return false; } Object this$businessName = getBusinessName(); Object other$businessName = other.getBusinessName(); if (this$businessName == null) { if (other$businessName != null) { return false; } } else if (!this$businessName.equals(other$businessName)) { return false; } Object this$message = getMessage(); Object other$message = other.getMessage(); if (this$message == null) { if (other$message != null) { return false; } } else if (!this$message.equals(other$message)) { return false; } Object this$attachments = getAttachments(); Object other$attachments = other.getAttachments(); if (this$attachments == null) { if (other$attachments != null) { return false; } } else if (!this$attachments.equals(other$attachments)) { return false; } Object this$notifyTime = getNotifyTime(); Object other$notifyTime = other.getNotifyTime(); if (this$notifyTime == null) { if (other$notifyTime != null) { return false; } } else if (!this$notifyTime.equals(other$notifyTime)) { return false; } Object this$description = getDescription(); Object other$description = other.getDescription(); return this$description == null ? other$description == null : this$description.equals(other$description); } return false; } return false; } protected boolean canEqual(final Object other) { return other instanceof NotificationEntity; } public int hashCode() { int result = super.hashCode(); Object $subscribeId = getSubscribeId(); int result2 = (result * 59) + ($subscribeId == null ? 43 : $subscribeId.hashCode()); Object $subscriber = getSubscriber(); int result3 = (result2 * 59) + ($subscriber == null ? 43 : $subscriber.hashCode()); Object $businessKey = getBusinessKey(); int result4 = (result3 * 59) + ($businessKey == null ? 43 : $businessKey.hashCode()); Object $businessName = getBusinessName(); int result5 = (result4 * 59) + ($businessName == null ? 43 : $businessName.hashCode()); Object $message = getMessage(); int result6 = (result5 * 59) + ($message == null ? 43 : $message.hashCode()); Object $attachments = getAttachments(); int result7 = (result6 * 59) + ($attachments == null ? 43 : $attachments.hashCode()); Object $notifyTime = getNotifyTime(); int result8 = (result7 * 59) + ($notifyTime == null ? 43 : $notifyTime.hashCode()); Object $description = getDescription(); return (result8 * 59) + ($description == null ? 43 : $description.hashCode()); } public String getSubscribeId() { return this.subscribeId; } public String getSubscriber() { return this.subscriber; } public String getBusinessKey() { return this.businessKey; } public String getBusinessName() { return this.businessName; } public String getMessage() { return this.message; } public String getAttachments() { return this.attachments; } public Date getNotifyTime() { return this.notifyTime; } public String getDescription() { return this.description; } public static NotificationEntity from(Notification notification) { return (NotificationEntity) BeanUtil.copy(notification, NotificationEntity.class); } }