107 lines
2.0 KiB
Java
107 lines
2.0 KiB
Java
package eu.dnetlib.uoaadmintools.entities;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
import org.springframework.data.annotation.Id;
|
|
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
|
|
public class Question {
|
|
|
|
@Id
|
|
@JsonProperty("_id")
|
|
private String id;
|
|
|
|
private String question;
|
|
private String answer;
|
|
private Date date = new Date();
|
|
private boolean isActive = true;
|
|
private Float weight;
|
|
private int hitCount = 0;
|
|
private List<String> topics;
|
|
|
|
public Question() {
|
|
}
|
|
|
|
/*
|
|
public Question(String question, String answer, boolean isActive, Float weight, List<String> topics) {
|
|
this.question = question;
|
|
this.answer = answer;
|
|
this.isActive = isActive;
|
|
this.weight = weight;
|
|
this.topics = topics;
|
|
this.hitCount = 0;
|
|
this.isActive = true;
|
|
}
|
|
*/
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getQuestion() {
|
|
return question;
|
|
}
|
|
|
|
public void setQuestion(String question) {
|
|
this.question = question;
|
|
}
|
|
|
|
public String getAnswer() {
|
|
return answer;
|
|
}
|
|
|
|
public void setAnswer(String answer) {
|
|
this.answer = answer;
|
|
}
|
|
|
|
public Date getDate() {
|
|
return date;
|
|
}
|
|
|
|
public void setDate(Date date) {
|
|
this.date = date;
|
|
}
|
|
|
|
public boolean getIsActive() {
|
|
return isActive;
|
|
}
|
|
|
|
public void setIsActive(boolean isActive) {
|
|
this.isActive = isActive;
|
|
}
|
|
|
|
public Float getWeight() {
|
|
return weight;
|
|
}
|
|
|
|
public void setWeight(Float weight) {
|
|
this.weight = weight;
|
|
}
|
|
|
|
public int getHitCount() {
|
|
return hitCount;
|
|
}
|
|
|
|
public void setHitCount(int hitCount) {
|
|
this.hitCount = hitCount;
|
|
}
|
|
|
|
public List<String> getTopics() {
|
|
return topics;
|
|
}
|
|
|
|
public void setTopics(List<String> topics) {
|
|
this.topics = topics;
|
|
}
|
|
|
|
public void increment() {
|
|
hitCount++;
|
|
}
|
|
}
|