From ed68fa47f7a0c686836f438f8bd1d4ddeff55af0 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 2 Mar 2023 21:02:10 +0400 Subject: [PATCH] #91 -- Add markup table --- .../TimeSeriesMarkupController.java | 2 +- .../ulstu/extractor/markup/model/Markup.java | 30 +++++++++++++++++++ .../db/changelog-20230302_210000-schema.xml | 23 ++++++++++++++ src/main/resources/db/changelog-master.xml | 1 + 4 files changed, 55 insertions(+), 1 deletion(-) rename src/main/java/ru/ulstu/extractor/{ts => markup}/controller/TimeSeriesMarkupController.java (95%) create mode 100644 src/main/java/ru/ulstu/extractor/markup/model/Markup.java create mode 100644 src/main/resources/db/changelog-20230302_210000-schema.xml diff --git a/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java similarity index 95% rename from src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java rename to src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java index fbe7493..d9571a8 100644 --- a/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.ts.controller; +package ru.ulstu.extractor.markup.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; diff --git a/src/main/java/ru/ulstu/extractor/markup/model/Markup.java b/src/main/java/ru/ulstu/extractor/markup/model/Markup.java new file mode 100644 index 0000000..84c6d80 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/markup/model/Markup.java @@ -0,0 +1,30 @@ +package ru.ulstu.extractor.markup.model; + +import ru.ulstu.extractor.core.BaseEntity; +import ru.ulstu.extractor.ts.model.TimeSeries; + +import javax.persistence.Entity; +import javax.persistence.ManyToOne; + +@Entity +public class Markup extends BaseEntity { + @ManyToOne + private TimeSeries timeSeries; + private String markup; + + public TimeSeries getTimeSeries() { + return timeSeries; + } + + public void setTimeSeries(TimeSeries timeSeries) { + this.timeSeries = timeSeries; + } + + public String getMarkup() { + return markup; + } + + public void setMarkup(String markup) { + this.markup = markup; + } +} \ No newline at end of file diff --git a/src/main/resources/db/changelog-20230302_210000-schema.xml b/src/main/resources/db/changelog-20230302_210000-schema.xml new file mode 100644 index 0000000..7ccb661 --- /dev/null +++ b/src/main/resources/db/changelog-20230302_210000-schema.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db/changelog-master.xml b/src/main/resources/db/changelog-master.xml index dfde9f7..aa59e26 100644 --- a/src/main/resources/db/changelog-master.xml +++ b/src/main/resources/db/changelog-master.xml @@ -15,4 +15,5 @@ +