cancellata tabella drl_tipi_mod_stampa e creata nuova tabella di relazione drl_tipi_report tra le tabelle dtb_tipi e wtb_jrept
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250811101036 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("drop table drl_tipi_mod_stampa");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20250811102732 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement(" CREATE TABLE drl_tipi_report (id bigint identity not null, cod_dtip varchar(5) not null, report_id bigint not null, \n" +
|
||||
" \tsort_id TinyInt not null default 0, report_type tinyInt, is_required bit default 0,\n" +
|
||||
" CONSTRAINT PK_drl_tipi_report PRIMARY KEY (id),\n" +
|
||||
" CONSTRAINT FK_drl_tipi_report_cod_dtip FOREIGN KEY (cod_dtip) REFERENCES dtb_tipi(cod_dtip),\n" +
|
||||
" CONSTRAINT FK_drl_tipi_report_report_id FOREIGN KEY (report_id) REFERENCES wtb_jrept(id))",
|
||||
" CREATE UNIQUE INDEX idx_cod_dtip_sort_id ON drl_tipi_report (cod_dtip, sort_id)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import it.integry.ems_model.annotation.*;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
@Master()
|
||||
@PropertyReactive()
|
||||
@Table(value = DrlTipiModStampa.ENTITY)
|
||||
@JsonTypeName(value = DrlTipiModStampa.ENTITY)
|
||||
public class DrlTipiModStampa extends EntityBase {
|
||||
|
||||
public final static String ENTITY = "drl_tipi_mod_stampa";
|
||||
|
||||
private final static Long serialVersionUID = 1L;
|
||||
|
||||
private final static Logger logger = LogManager.getLogger();
|
||||
|
||||
public DrlTipiModStampa() {
|
||||
super(logger);
|
||||
}
|
||||
|
||||
@PK()
|
||||
@Identity()
|
||||
@SqlField(value = "id", nullable = false)
|
||||
private Long id;
|
||||
|
||||
@SqlField(value = "cod_dtip", maxLength = 5, nullable = false)
|
||||
@FK(tableName = DtbTipi.ENTITY, columnName = "cod_dtip")
|
||||
private String codDtip;
|
||||
|
||||
@SqlField(value = "mod_stampa", maxLength = 5, nullable = false)
|
||||
@FK(tableName = DtbModStampa.ENTITY, columnName = "mod_stampa")
|
||||
private String modStampa;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DrlTipiModStampa setId(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodDtip() {
|
||||
return codDtip;
|
||||
}
|
||||
|
||||
public DrlTipiModStampa setCodDtip(String codDtip) {
|
||||
this.codDtip = codDtip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getModStampa() {
|
||||
return modStampa;
|
||||
}
|
||||
|
||||
public DrlTipiModStampa setModStampa(String modStampa) {
|
||||
this.modStampa = modStampa;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package it.integry.ems_model.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import it.integry.ems_model.annotation.*;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
@Master()
|
||||
@PropertyReactive()
|
||||
@Table(value = DrlTipiReport.ENTITY)
|
||||
@JsonTypeName(value = DrlTipiReport.ENTITY)
|
||||
public class DrlTipiReport extends EntityBase {
|
||||
|
||||
public final static String ENTITY = "drl_tipi_report";
|
||||
|
||||
private final static Long serialVersionUID = 1L;
|
||||
|
||||
private final static Logger logger = LogManager.getLogger();
|
||||
|
||||
public DrlTipiReport() {
|
||||
super(logger);
|
||||
}
|
||||
|
||||
@PK()
|
||||
@Identity()
|
||||
@SqlField(value = "id", nullable = false)
|
||||
private Long id;
|
||||
|
||||
@SqlField(value = "cod_dtip", maxLength = 5, nullable = false)
|
||||
@FK(tableName = DtbTipi.ENTITY, columnName = "cod_dtip")
|
||||
private String codDtip;
|
||||
|
||||
@SqlField(value = "report_id", nullable = false)
|
||||
@FK(tableName = WtbJrept.ENTITY, columnName = "id")
|
||||
private Long reportId;
|
||||
|
||||
@SqlField(value = "sort_id", nullable = false)
|
||||
private Short sortId;
|
||||
|
||||
@SqlField(value = "report_type", nullable = true)
|
||||
private Short reportType;
|
||||
|
||||
@SqlField(value = "is_required", nullable = true)
|
||||
private Boolean isRequired;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DrlTipiReport setId(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodDtip() {
|
||||
return codDtip;
|
||||
}
|
||||
|
||||
public DrlTipiReport setCodDtip(String codDtip) {
|
||||
this.codDtip = codDtip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getReportId() {
|
||||
return reportId;
|
||||
}
|
||||
|
||||
public DrlTipiReport setReportId(Long reportId) {
|
||||
this.reportId = reportId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Short getSortId() {
|
||||
return sortId;
|
||||
}
|
||||
|
||||
public DrlTipiReport setSortId(Short sortId) {
|
||||
this.sortId = sortId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Short getReportType() {
|
||||
return reportType;
|
||||
}
|
||||
|
||||
public DrlTipiReport setReportType(Short reportType) {
|
||||
this.reportType = reportType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getIsRequired() {
|
||||
return isRequired;
|
||||
}
|
||||
|
||||
public DrlTipiReport setIsRequired(Boolean isRequired) {
|
||||
this.isRequired = isRequired;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,6 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Master
|
||||
@PropertyReactive
|
||||
@Table(DtbModStampa.ENTITY)
|
||||
@@ -40,9 +37,6 @@ public class DtbModStampa extends EntityBase {
|
||||
@SqlField(value = "report_id")
|
||||
private Long reportId;
|
||||
|
||||
@EntityChild
|
||||
private List<DrlTipiModStampa> drlTipiModStampa= new ArrayList<>();
|
||||
|
||||
public DtbModStampa() {
|
||||
super(logger);
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ public class DtbTipi extends EntityBase {
|
||||
private WtbJreptSetup wtbJreptSetup;
|
||||
|
||||
@EntityChild
|
||||
private List<DrlTipiModStampa> drlTipiModStampa= new ArrayList<>();
|
||||
private List<DrlTipiReport> drlTipiReport= new ArrayList<>();
|
||||
|
||||
public DtbTipi() {
|
||||
super(logger);
|
||||
|
||||
@@ -80,6 +80,9 @@ public class WtbJrept extends EntityBase {
|
||||
@EntityChild(copyPk = false)
|
||||
private List<WtbJreptSetup> wtbJreptSetups = new ArrayList<>();
|
||||
|
||||
@EntityChild
|
||||
private List<DrlTipiReport> drlTipiReport= new ArrayList<>();
|
||||
|
||||
public WtbJrept() {
|
||||
super(logger);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user