diff --git a/deploy/gdccloud/deploy.sh b/deploy/gdccloud/deploy.sh
index 5429a76..26604b7 100644
--- a/deploy/gdccloud/deploy.sh
+++ b/deploy/gdccloud/deploy.sh
@@ -18,6 +18,6 @@ fi
ssh $USERSERVER "cd /tmp && rm -rf $ARTIFACT_NAME*.jar && echo `date` 'killed' >> log_$ARTIFACT_NAME"
scp build/libs/$ARTIFACT_NAME-0.1.0-SNAPSHOT.jar $USERSERVER:/tmp/$ARTIFACT_NAME-0.1.0-SNAPSHOT.jar
-ssh $USERSERVER -f "cd /tmp/ && /opt/jdk1.8.0_192/bin/java -jar $ARTIFACT_NAME-0.1.0-SNAPSHOT.jar -Xms 512m -Xmx 1024m --server.port=8443 --server.http.port=8080 >> /home/user/logfile_$ARTIFACT_NAME" &
+ssh $USERSERVER -f "cd /tmp/ && /opt/jdk1.8.0_192/bin/java -jar $ARTIFACT_NAME-0.1.0-SNAPSHOT.jar -Xms 512m -Xmx 1024m --server.port=8443 --server.http.port=8080 --ng-tracker.base-url=http://193.110.3.124:8080 >> /home/user/logfile_$ARTIFACT_NAME" &
sleep 10
echo "is deployed"
\ No newline at end of file
diff --git a/src/main/java/ru/ulstu/timeline/model/Event.java b/src/main/java/ru/ulstu/timeline/model/Event.java
index cec7614..b1b6c97 100644
--- a/src/main/java/ru/ulstu/timeline/model/Event.java
+++ b/src/main/java/ru/ulstu/timeline/model/Event.java
@@ -5,11 +5,33 @@ import ru.ulstu.core.model.BaseEntity;
import ru.ulstu.user.model.User;
import javax.persistence.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.FetchType;
+import javax.persistence.ManyToMany;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
import java.util.Date;
import java.util.List;
@Entity
public class Event extends BaseEntity {
+ public enum EventStatus {
+ POSSIBLE("Возможное"), NEW("Новое"), IN_PROGRESS("В процессе"), COMPLETED("Завершено");
+
+ private String name;
+
+ EventStatus(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+ }
+
@NotBlank
private String title;
@@ -20,6 +42,9 @@ public class Event extends BaseEntity {
@Temporal(TemporalType.TIMESTAMP)
private Date beginDate;
+ @Enumerated(value = EnumType.STRING)
+ private EventStatus status;
+
@Column(name = "execute_date")
@Temporal(TemporalType.TIMESTAMP)
private Date executeDate;
@@ -45,14 +70,6 @@ public class Event extends BaseEntity {
this.title = title;
}
- public PeriodEvent getPeriod() {return period; }
-
- public void setPeriod(PeriodEvent period) { this.period = period; }
-
- public Date getBeginDate() {return beginDate; }
-
- public void setBeginDate(Date beginDate){this.beginDate = beginDate; }
-
public Date getCreateDate() {
return createDate;
}
diff --git a/src/main/java/ru/ulstu/timeline/model/EventDto.java b/src/main/java/ru/ulstu/timeline/model/EventDto.java
index 65ca13e..4ababa8 100644
--- a/src/main/java/ru/ulstu/timeline/model/EventDto.java
+++ b/src/main/java/ru/ulstu/timeline/model/EventDto.java
@@ -14,6 +14,7 @@ public class EventDto {
private final String title;
private final PeriodEvent period;
private final Date beginDate;
+ private final Event.EventStatus status;
private final Date executeDate;
private final Date createDate;
private final Date updateDate;
@@ -23,6 +24,7 @@ public class EventDto {
@JsonCreator
public EventDto(@JsonProperty("id") Integer id,
@JsonProperty("title") String title,
+ @JsonProperty("status") Event.EventStatus status,
@JsonProperty("period") PeriodEvent period,
@JsonProperty("beginDate") Date beginDate,
@JsonProperty("executeDate") Date executeDate,
@@ -34,6 +36,7 @@ public class EventDto {
this.title = title;
this.period = period;
this.beginDate = beginDate;
+ this.status = status;
this.executeDate = executeDate;
this.createDate = createDate;
this.updateDate = updateDate;
@@ -44,6 +47,7 @@ public class EventDto {
public EventDto(Event event) {
this.id = event.getId();
this.title = event.getTitle();
+ this.status = event.getStatus();
this.period = event.getPeriod();
this.beginDate = event.getBeginDate();
this.executeDate = event.getExecuteDate();
@@ -65,6 +69,8 @@ public class EventDto {
public Date getBeginDate() { return beginDate; }
+ public Event.EventStatus getStatus() { return status; }
+
public Date getCreateDate() {
return createDate;
}
diff --git a/src/main/java/ru/ulstu/timeline/service/EventService.java b/src/main/java/ru/ulstu/timeline/service/EventService.java
index 4ead8ab..63eb2da 100644
--- a/src/main/java/ru/ulstu/timeline/service/EventService.java
+++ b/src/main/java/ru/ulstu/timeline/service/EventService.java
@@ -48,6 +48,7 @@ public class EventService {
event.setTitle(eventDto.getTitle());
event.setPeriod(eventDto.getPeriod());
event.setBeginDate(eventDto.getBeginDate());
+ event.setStatus(eventDto.getStatus());
event.setUpdateDate(eventDto.getUpdateDate());
return event;
}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index e696ccd..fb1b116 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -32,7 +32,7 @@ liquibase.drop-first=false
liquibase.enabled=true
liquibase.change-log=classpath:db/changelog-master.xml
# Application Settings
-ng-tracker.base-url=https://127.0.0.1:8443
+ng-tracker.base-url=http://127.0.0.1:8080
ng-tracker.undead-user-login=admin
ng-tracker.dev-mode=true
ng-tracker.use-https=false
\ No newline at end of file
diff --git a/src/main/resources/db/changelog-20181031_000000-schema.xml b/src/main/resources/db/changelog-20181031_000000-schema.xml
new file mode 100644
index 0000000..7a727fc
--- /dev/null
+++ b/src/main/resources/db/changelog-20181031_000000-schema.xml
@@ -0,0 +1,13 @@
+
+
Уважаемый(ая) Ivan Ivanov