123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- package edu.nju.entities;
- import org.springframework.data.annotation.Id;
- import org.springframework.data.mongodb.core.mapping.Document;
- import java.util.ArrayList;
- import java.util.List;
- @Document
- public class Answer implements java.io.Serializable{
- private static final long serialVersionUID = -8263451883506704407L;
- @Id
- private String id;
- private String item_id;
- private List<String> answers;
- private String worker_id;
- private String job_id;
- private List<String> attachment_location;
- public Answer(String item_id, List<String> answers, String worker_id, List<String> attachment_location,String job_id) {
- this.item_id = item_id;
- this.answers = answers;
- this.worker_id = worker_id;
- this.attachment_location = attachment_location;
- this.job_id=job_id;
- }
- public Answer(String item_id,String worker_id,String job_id,int optionNum){
- this.item_id = item_id;
- this.worker_id = worker_id;
- this.attachment_location = new ArrayList<>();
- this.job_id=job_id;
- this.answers=new ArrayList<>();
- for(int i=0;i<optionNum;i++){
- answers.add("-1");
- }
- }
- public String getId() {
- return id;
- }
- public void setId(String id) {
- this.id = id;
- }
- public String getItem_id() {
- return item_id;
- }
- public void setItem_id(String item_id) {
- this.item_id = item_id;
- }
- public List<String> getAnswers() {
- return answers;
- }
- public void setAnswers(List<String> answers) {
- this.answers = answers;
- }
- public String getWorker_id() {
- return worker_id;
- }
- public void setWorker_id(String worker_id) {
- this.worker_id = worker_id;
- }
- public List<String> getAttachment_location() {
- return attachment_location;
- }
- public void setAttachment_location(List<String> attachment_location) {
- this.attachment_location = attachment_location;
- }
- public String getJob_id() {
- return job_id;
- }
- public void setJob_id(String job_id) {
- this.job_id = job_id;
- }
- }
|