From f960d4de1b78cd9a8cd01ea43bdd6304fcc7d844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B0=D1=81=D0=B8=D0=BD=20=D0=90=D0=BD=D1=82=D0=BE?= =?UTF-8?q?=D0=BD?= Date: Fri, 17 May 2019 11:30:26 +0300 Subject: [PATCH] #98 deadline model edited --- src/main/java/ru/ulstu/deadline/model/Deadline.java | 5 +++++ src/main/java/ru/ulstu/grant/service/GrantService.java | 2 +- src/main/java/ru/ulstu/paper/service/PaperService.java | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/ulstu/deadline/model/Deadline.java b/src/main/java/ru/ulstu/deadline/model/Deadline.java index 9ab9acd..5ab9f47 100644 --- a/src/main/java/ru/ulstu/deadline/model/Deadline.java +++ b/src/main/java/ru/ulstu/deadline/model/Deadline.java @@ -26,6 +26,11 @@ public class Deadline extends BaseEntity { public Deadline() { } + public Deadline(Date deadlineDate, String description) { + this.date = deadlineDate; + this.description = description; + } + public Deadline(Date deadlineDate, String description, String executor, Boolean done) { this.date = deadlineDate; this.description = description; diff --git a/src/main/java/ru/ulstu/grant/service/GrantService.java b/src/main/java/ru/ulstu/grant/service/GrantService.java index c06a71c..45f9b2f 100644 --- a/src/main/java/ru/ulstu/grant/service/GrantService.java +++ b/src/main/java/ru/ulstu/grant/service/GrantService.java @@ -164,7 +164,7 @@ public class GrantService { grant.setComment("Комментарий к гранту 1"); grant.setProject(projectId); grant.setStatus(APPLICATION); - grant.getDeadlines().add(new Deadline(deadlineDate, "первый дедлайн", "", false)); + grant.getDeadlines().add(new Deadline(deadlineDate, "первый дедлайн")); grant.getAuthors().add(user); grant.setLeader(user); grant.getPapers().add(paper); diff --git a/src/main/java/ru/ulstu/paper/service/PaperService.java b/src/main/java/ru/ulstu/paper/service/PaperService.java index 0a60c92..db810f5 100644 --- a/src/main/java/ru/ulstu/paper/service/PaperService.java +++ b/src/main/java/ru/ulstu/paper/service/PaperService.java @@ -173,7 +173,7 @@ public class PaperService { Paper paper = new Paper(); paper.setTitle(title); paper.getAuthors().add(user); - paper.getDeadlines().add(new Deadline(deadlineDate, "первый дедлайн", "", false)); + paper.getDeadlines().add(new Deadline(deadlineDate, "первый дедлайн")); paper.setCreateDate(new Date()); paper.setUpdateDate(new Date()); paper.setStatus(DRAFT);