From 43740981f2b7335ff76aa6450957bf40d6bce4e2 Mon Sep 17 00:00:00 2001 From: Alyona Date: Sat, 27 Oct 2018 22:24:10 +0400 Subject: [PATCH] add deadlineDate to models --- src/main/java/ru/ulstu/paper/model/Paper.java | 11 +++++++++++ src/main/java/ru/ulstu/paper/model/PaperDto.java | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/src/main/java/ru/ulstu/paper/model/Paper.java b/src/main/java/ru/ulstu/paper/model/Paper.java index ad6950a..77b8e0c 100644 --- a/src/main/java/ru/ulstu/paper/model/Paper.java +++ b/src/main/java/ru/ulstu/paper/model/Paper.java @@ -37,6 +37,9 @@ public class Paper extends BaseEntity { @Column(name = "update_date") private Date updateDate; + @Column(name = "deadline_date") + private Date deadlineDate; + private String comment; private Boolean locked; @@ -72,6 +75,14 @@ public class Paper extends BaseEntity { this.updateDate = updateDate; } + public Date getDeadlineDate() { + return deadlineDate; + } + + public void setDeadlineDate(Date deadlineDate) { + this.deadlineDate = deadlineDate; + } + public String getComment() { return comment; } diff --git a/src/main/java/ru/ulstu/paper/model/PaperDto.java b/src/main/java/ru/ulstu/paper/model/PaperDto.java index d7fb8f2..aeb4e3f 100644 --- a/src/main/java/ru/ulstu/paper/model/PaperDto.java +++ b/src/main/java/ru/ulstu/paper/model/PaperDto.java @@ -15,6 +15,7 @@ public class PaperDto { private final Paper.PaperStatus status; private final Date createDate; private final Date updateDate; + private final Date deadlineDate; private final String comment; private final Boolean locked; private final String tmpFileName; @@ -29,6 +30,7 @@ public class PaperDto { @JsonProperty("status") Paper.PaperStatus status, @JsonProperty("createDate") Date createDate, @JsonProperty("updateDate") Date updateDate, + @JsonProperty("deadlineDate") Date deadlineDate, @JsonProperty("comment") String comment, @JsonProperty("locked") Boolean locked, @JsonProperty("tmpFileName") String tmpFileName, @@ -38,6 +40,7 @@ public class PaperDto { this.status = status; this.createDate = createDate; this.updateDate = updateDate; + this.deadlineDate = deadlineDate; this.comment = comment; this.locked = locked; this.tmpFileName = tmpFileName; @@ -53,6 +56,7 @@ public class PaperDto { this.status = paper.getStatus(); this.createDate = paper.getCreateDate(); this.updateDate = paper.getUpdateDate(); + this.deadlineDate = paper.getDeadlineDate(); this.comment = paper.getComment(); this.locked = paper.getLocked(); this.tmpFileName = null; @@ -82,6 +86,8 @@ public class PaperDto { return updateDate; } + public Date getDeadlineDate() {return deadlineDate;} + public String getComment() { return comment; }