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 question
|
*/
|
@TableName(value = "question")
|
@Data
|
public class Question implements Serializable {
|
/**
|
* 提问词id
|
*/
|
@TableId(type = IdType.AUTO)
|
private Integer question_id;
|
|
/**
|
* 关键词id
|
*/
|
private Integer keyword_id;
|
|
/**
|
* 提问词
|
*/
|
private String question;
|
|
/**
|
* 提示词状态,(pending:待处理;processing:处理中 ; success:处理成功;failed:处理失败 )
|
*/
|
private String status;
|
|
/**
|
* 提交人
|
*/
|
private String user_name;
|
|
/**
|
* 提交人邮箱
|
*/
|
private String user_email;
|
|
/**
|
* 采集时间
|
*/
|
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", timezone = "GMT+8")
|
private LocalDateTime timestamp;
|
|
/**
|
* 提取的引用数量
|
*/
|
private Integer extracted_count;
|
|
/**
|
* AI回复内容
|
*/
|
private String response;
|
|
/**
|
* 错误信息
|
*/
|
private String error;
|
|
@TableField(exist = false)
|
private static final long serialVersionUID = 1L;
|
|
@Override
|
public boolean equals(Object that) {
|
if (this == that) {
|
return true;
|
}
|
if (that == null) {
|
return false;
|
}
|
if (getClass() != that.getClass()) {
|
return false;
|
}
|
Question other = (Question) that;
|
return (this.getQuestion_id() == null ? other.getQuestion_id() == null
|
: this.getQuestion_id().equals(other.getQuestion_id()))
|
&& (this.getKeyword_id() == null ? other.getKeyword_id() == null
|
: this.getKeyword_id().equals(other.getKeyword_id()))
|
&& (this.getQuestion() == null ? other.getQuestion() == null
|
: this.getQuestion().equals(other.getQuestion()))
|
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
&& (this.getUser_name() == null ? other.getUser_name() == null
|
: this.getUser_name().equals(other.getUser_name()))
|
&& (this.getUser_email() == null ? other.getUser_email() == null
|
: this.getUser_email().equals(other.getUser_email()))
|
&& (this.getTimestamp() == null ? other.getTimestamp() == null
|
: this.getTimestamp().equals(other.getTimestamp()))
|
&& (this.getExtracted_count() == null ? other.getExtracted_count() == null
|
: this.getExtracted_count().equals(other.getExtracted_count()))
|
&& (this.getResponse() == null ? other.getResponse() == null
|
: this.getResponse().equals(other.getResponse()))
|
&& (this.getError() == null ? other.getError() == null : this.getError().equals(other.getError()));
|
}
|
|
@Override
|
public int hashCode() {
|
final int prime = 31;
|
int result = 1;
|
result = prime * result + ((getQuestion_id() == null) ? 0 : getQuestion_id().hashCode());
|
result = prime * result + ((getKeyword_id() == null) ? 0 : getKeyword_id().hashCode());
|
result = prime * result + ((getQuestion() == null) ? 0 : getQuestion().hashCode());
|
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
result = prime * result + ((getUser_name() == null) ? 0 : getUser_name().hashCode());
|
result = prime * result + ((getUser_email() == null) ? 0 : getUser_email().hashCode());
|
result = prime * result + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode());
|
result = prime * result + ((getExtracted_count() == null) ? 0 : getExtracted_count().hashCode());
|
result = prime * result + ((getResponse() == null) ? 0 : getResponse().hashCode());
|
result = prime * result + ((getError() == null) ? 0 : getError().hashCode());
|
return result;
|
}
|
|
@Override
|
public String toString() {
|
StringBuilder sb = new StringBuilder();
|
sb.append(getClass().getSimpleName());
|
sb.append(" [");
|
sb.append("Hash = ").append(hashCode());
|
sb.append(", question_id=").append(question_id);
|
sb.append(", keyword_id=").append(keyword_id);
|
sb.append(", question=").append(question);
|
sb.append(", status=").append(status);
|
sb.append(", user_name=").append(user_name);
|
sb.append(", user_email=").append(user_email);
|
sb.append(", timestamp=").append(timestamp);
|
sb.append(", extracted_count=").append(extracted_count);
|
sb.append(", response=").append(response);
|
sb.append(", error=").append(error);
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
sb.append("]");
|
return sb.toString();
|
}
|
}
|