diff --git a/src/main/java/eu/openaire/urls_controller/models/Assignment.java b/src/main/java/eu/openaire/urls_controller/models/Assignment.java new file mode 100644 index 0000000..211243c --- /dev/null +++ b/src/main/java/eu/openaire/urls_controller/models/Assignment.java @@ -0,0 +1,52 @@ +package eu.openaire.urls_controller.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.Date; +import java.util.List; + + +public class Assignment { + + @JsonProperty("tasks") + List tasks; + + @JsonProperty("workerId") + String workerId; + + @JsonProperty("date") + Date date; + + public List getTasks() { + return tasks; + } + + public void setTasks(List tasks) { + this.tasks = tasks; + } + + public String getWorkerId() { + return workerId; + } + + public void setWorkerId(String workerId) { + this.workerId = workerId; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + @Override + public String toString() { + return "Assignment{" + + "tasks=" + tasks + + ", workerId='" + workerId + '\'' + + ", date=" + date + + '}'; + } +} diff --git a/src/main/java/eu/openaire/urls_controller/models/Error.java b/src/main/java/eu/openaire/urls_controller/models/Error.java new file mode 100644 index 0000000..45a4ed5 --- /dev/null +++ b/src/main/java/eu/openaire/urls_controller/models/Error.java @@ -0,0 +1,36 @@ +package eu.openaire.urls_controller.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Error { + + @JsonProperty("type") + String type; + + @JsonProperty("message") + String message; + + public String getType() { + return type; + } + + public void setType(String type) { + type = type; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public String toString() { + return "Error{" + + "type='" + type + '\'' + + ", message='" + message + '\'' + + '}'; + } +} diff --git a/src/main/java/eu/openaire/urls_controller/models/Task.java b/src/main/java/eu/openaire/urls_controller/models/Task.java new file mode 100644 index 0000000..9446ee4 --- /dev/null +++ b/src/main/java/eu/openaire/urls_controller/models/Task.java @@ -0,0 +1,36 @@ +package eu.openaire.urls_controller.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Task { + + @JsonProperty("id") + String id; + + @JsonProperty("url") + String url; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + @Override + public String toString() { + return "Task{" + + "id='" + id + '\'' + + ", url='" + url + '\'' + + '}'; + } +}