package com.linghu.model.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.time.LocalDateTime; import java.util.Date; import lombok.Data; import com.fasterxml.jackson.annotation.JsonFormat; /** * * @TableName reference */ @TableName(value = "reference") @Data public class Reference implements Serializable { /** * 结果id */ @TableId(type = IdType.AUTO) private Integer reference_id; /** * 类型id */ private Integer type_id; /** * 平台id */ private Integer platform_id; /** * 标题 */ private String title; /** * 重复次数 */ private Integer repetition_num; /** * 创建时间 */ @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", timezone = "GMT+8") private LocalDateTime create_time; /** * 采集轮数 */ private Integer num; /** * 来源url */ private String url; /** * 域名 */ private String domain; /** * 任务id */ private String task_id; /** * 关键词id */ private Integer keyword_id; /** * 问题id */ private Integer question_id; @TableField(exist = false) private static final long serialVersionUID = 1L; public Reference(Integer question_id, String title, String url, String domain, Integer keyword_id, String task_id) { this.question_id = question_id; this.title = title; this.url = url; this.domain = domain; this.task_id = task_id; this.keyword_id = keyword_id; } public Reference() { super(); } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Reference other = (Reference) that; return (this.getReference_id() == null ? other.getReference_id() == null : this.getReference_id().equals(other.getReference_id())) && (this.getType_id() == null ? other.getType_id() == null : this.getType_id().equals(other.getType_id())) && (this.getPlatform_id() == null ? other.getPlatform_id() == null : this.getPlatform_id().equals(other.getPlatform_id())) && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) && (this.getRepetition_num() == null ? other.getRepetition_num() == null : this.getRepetition_num().equals(other.getRepetition_num())) && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time())) && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl())) && (this.getDomain() == null ? other.getDomain() == null : this.getDomain().equals(other.getDomain())) && (this.getTask_id() == null ? other.getTask_id() == null : this.getTask_id().equals(other.getTask_id())) && (this.getKeyword_id() == null ? other.getKeyword_id() == null : this.getKeyword_id().equals(other.getKeyword_id())) && (this.getQuestion_id() == null ? other.getQuestion_id() == null : this.getQuestion_id().equals(other.getQuestion_id())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getReference_id() == null) ? 0 : getReference_id().hashCode()); result = prime * result + ((getType_id() == null) ? 0 : getType_id().hashCode()); result = prime * result + ((getPlatform_id() == null) ? 0 : getPlatform_id().hashCode()); result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); result = prime * result + ((getRepetition_num() == null) ? 0 : getRepetition_num().hashCode()); result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode()); result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode()); result = prime * result + ((getDomain() == null) ? 0 : getDomain().hashCode()); result = prime * result + ((getTask_id() == null) ? 0 : getTask_id().hashCode()); result = prime * result + ((getKeyword_id() == null) ? 0 : getKeyword_id().hashCode()); result = prime * result + ((getQuestion_id() == null) ? 0 : getQuestion_id().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", reference_id=").append(reference_id); sb.append(", type_id=").append(type_id); sb.append(", platform_id=").append(platform_id); sb.append(", title=").append(title); sb.append(", repetition_num=").append(repetition_num); sb.append(", create_time=").append(create_time); sb.append(", num=").append(num); sb.append(", url=").append(url); sb.append(", domain=").append(domain); sb.append(", task_id=").append(task_id); sb.append(", keyword_id=").append(keyword_id); sb.append(", question_id=").append(question_id); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }