Merge branch 'master' into develop

This commit is contained in:
2024-05-20 16:46:04 +02:00
2 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20240520163553 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement(
"ALTER TABLE vtb_viaggi\n" +
" ADD posizione SMALLINT DEFAULT 0 NOT NULL;\n",
"ALTER TABLE vtb_viaggi\n" +
" ADD confermato BIT DEFAULT 0 NOT NULL;"
);
}
@Override
public void down() throws Exception {
}
}

View File

@@ -53,6 +53,12 @@ public class VtbViaggi extends EntityBase {
@SqlField(value = "mezzo", maxLength = 1, defaultObjectValue = "0")
private Mezzo mezzo;
@SqlField(value = "posizione", defaultObjectValue = "0")
private short posizione;
@SqlField(value = "confermato", defaultObjectValue = "0")
private boolean confermato;
public VtbViaggi() {
super();
}
@@ -141,6 +147,24 @@ public class VtbViaggi extends EntityBase {
return this;
}
public short getPosizione() {
return posizione;
}
public VtbViaggi setPosizione(short posizione) {
this.posizione = posizione;
return this;
}
public boolean isConfermato() {
return confermato;
}
public VtbViaggi setConfermato(boolean confermato) {
this.confermato = confermato;
return this;
}
public enum Mezzo implements IBaseEnum<Mezzo> {
VETTORE((short) 0), MITTENTE((short) 1), DESTINATARIO((short) 2);