#91 -- Add markup table
This commit is contained in:
parent
704366f11a
commit
ed68fa47f7
@ -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;
|
30
src/main/java/ru/ulstu/extractor/markup/model/Markup.java
Normal file
30
src/main/java/ru/ulstu/extractor/markup/model/Markup.java
Normal file
@ -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;
|
||||
}
|
||||
}
|
23
src/main/resources/db/changelog-20230302_210000-schema.xml
Normal file
23
src/main/resources/db/changelog-20230302_210000-schema.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||||
<changeSet author="orion" id="20230302-210000-1">
|
||||
<createTable tableName="markup">
|
||||
<column name="id" type="integer">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="version" type="integer"/>
|
||||
<column name="time_series_id" type="integer">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="markup" type="varchar(500)">
|
||||
</column>
|
||||
</createTable>
|
||||
<addPrimaryKey columnNames="id" constraintName="pk_markup" tableName="markup"/>
|
||||
<addForeignKeyConstraint baseTableName="markup" baseColumnNames="time_series_id"
|
||||
constraintName="fk_markup_time_series"
|
||||
referencedTableName="time_series"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
@ -15,4 +15,5 @@
|
||||
<include file="db/changelog-20220422_120000-schema.xml"/>
|
||||
<include file="db/changelog-20220621_120000-schema.xml"/>
|
||||
<include file="db/changelog-20221012_170000-schema.xml"/>
|
||||
<include file="db/changelog-20230302_210000-schema.xml"/>
|
||||
</databaseChangeLog>
|
||||
|
Loading…
Reference in New Issue
Block a user