From f92b582983b9cd2c5e0cf00715eed39d52edce76 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 25 Oct 2023 23:54:40 +0200 Subject: [PATCH] [DEV] folow the archidata API --- back/.classpath | 1 + back/.properties | 1 - back/pom.xml | 29 +++++++++++-------- back/src/org/kar/karso/model/Application.java | 4 +-- back/src/org/kar/karso/model/Right.java | 4 +-- .../org/kar/karso/model/RightDescription.java | 4 +-- back/src/org/kar/karso/model/Settings.java | 4 +-- .../kar/karso/model/UserLinkApplication.java | 4 +-- 8 files changed, 28 insertions(+), 23 deletions(-) diff --git a/back/.classpath b/back/.classpath index 3b18167..bc0f9ef 100644 --- a/back/.classpath +++ b/back/.classpath @@ -27,6 +27,7 @@ + diff --git a/back/.properties b/back/.properties index da0a187..e69de29 100644 --- a/back/.properties +++ b/back/.properties @@ -1 +0,0 @@ -io.scenarium.web.karso.address=sqdfsqdfqsdf \ No newline at end of file diff --git a/back/pom.xml b/back/pom.xml index 553bcda..f8be67b 100644 --- a/back/pom.xml +++ b/back/pom.xml @@ -5,10 +5,6 @@ karso 0.4.3 - 3.1 17 17 @@ -26,19 +22,28 @@ archidata 0.4.0 - org.slf4j slf4j-simple 2.0.7 - + org.junit.jupiter junit-jupiter-api - 5.7.2 + 5.10.0 test + + org.junit.jupiter + junit-jupiter-engine + 5.10.0 + test + src @@ -49,6 +54,11 @@ src/resources + + + ${basedir}/test/resources + + org.apache.maven.plugins @@ -178,11 +188,6 @@ - - - ${basedir}/test/resources - - diff --git a/back/src/org/kar/karso/model/Application.java b/back/src/org/kar/karso/model/Application.java index 8676aca..57492d6 100644 --- a/back/src/org/kar/karso/model/Application.java +++ b/back/src/org/kar/karso/model/Application.java @@ -13,7 +13,7 @@ CREATE TABLE `application` ( import org.kar.archidata.annotation.SQLComment; import org.kar.archidata.annotation.SQLDefault; import org.kar.archidata.annotation.SQLIfNotExists; -import org.kar.archidata.model.GenericTable; +import org.kar.archidata.model.GenericTableSoftDelete; import com.fasterxml.jackson.annotation.JsonInclude; @@ -23,7 +23,7 @@ import jakarta.persistence.Table; @Table(name = "application") @SQLIfNotExists @JsonInclude(JsonInclude.Include.NON_NULL) -public class Application extends GenericTable { +public class Application extends GenericTableSoftDelete { @Column(length = 256) public String name; @Column(length = 2048) diff --git a/back/src/org/kar/karso/model/Right.java b/back/src/org/kar/karso/model/Right.java index 3a84b83..f809b0d 100644 --- a/back/src/org/kar/karso/model/Right.java +++ b/back/src/org/kar/karso/model/Right.java @@ -2,7 +2,7 @@ package org.kar.karso.model; import org.kar.archidata.annotation.SQLComment; import org.kar.archidata.annotation.SQLIfNotExists; -import org.kar.archidata.model.GenericTable; +import org.kar.archidata.model.GenericTableSoftDelete; import com.fasterxml.jackson.annotation.JsonInclude; @@ -14,7 +14,7 @@ import jakarta.persistence.Table; @Table(name = "right") @SQLIfNotExists @JsonInclude(JsonInclude.Include.NON_NULL) -public class Right extends GenericTable { +public class Right extends GenericTableSoftDelete { @Column(nullable = false) @SQLComment("application-ID that have the reference of the right") diff --git a/back/src/org/kar/karso/model/RightDescription.java b/back/src/org/kar/karso/model/RightDescription.java index 2995d38..6b3e0d4 100644 --- a/back/src/org/kar/karso/model/RightDescription.java +++ b/back/src/org/kar/karso/model/RightDescription.java @@ -3,7 +3,7 @@ package org.kar.karso.model; import org.kar.archidata.annotation.SQLComment; import org.kar.archidata.annotation.SQLDefault; import org.kar.archidata.annotation.SQLIfNotExists; -import org.kar.archidata.model.GenericTable; +import org.kar.archidata.model.GenericTableSoftDelete; import com.fasterxml.jackson.annotation.JsonInclude; @@ -15,7 +15,7 @@ import jakarta.persistence.Table; @Table(name = "rightDescription") @SQLIfNotExists @JsonInclude(JsonInclude.Include.NON_NULL) -public class RightDescription extends GenericTable { +public class RightDescription extends GenericTableSoftDelete { @Column(nullable = false) @SQLComment("Application id that have the reference of the right") @ManyToOne(fetch = FetchType.LAZY, targetEntity = Application.class) diff --git a/back/src/org/kar/karso/model/Settings.java b/back/src/org/kar/karso/model/Settings.java index c455a5b..1b2f6c4 100644 --- a/back/src/org/kar/karso/model/Settings.java +++ b/back/src/org/kar/karso/model/Settings.java @@ -13,7 +13,7 @@ CREATE TABLE `application` ( import org.kar.archidata.annotation.SQLComment; import org.kar.archidata.annotation.SQLDefault; import org.kar.archidata.annotation.SQLIfNotExists; -import org.kar.archidata.model.GenericTable; +import org.kar.archidata.model.GenericTableSoftDelete; import com.fasterxml.jackson.annotation.JsonInclude; @@ -27,7 +27,7 @@ enum PropertyType { @Table(name = "settings") @SQLIfNotExists @JsonInclude(JsonInclude.Include.NON_NULL) -public class Settings extends GenericTable { +public class Settings extends GenericTableSoftDelete { @Column(length = 512, nullable = false) public String key; @SQLComment("Right for the specific element(ADMIN [rw] USER [rw] other [rw])") diff --git a/back/src/org/kar/karso/model/UserLinkApplication.java b/back/src/org/kar/karso/model/UserLinkApplication.java index 0e8d0a2..a55557b 100644 --- a/back/src/org/kar/karso/model/UserLinkApplication.java +++ b/back/src/org/kar/karso/model/UserLinkApplication.java @@ -11,7 +11,7 @@ CREATE TABLE `application` ( */ import org.kar.archidata.annotation.SQLIfNotExists; -import org.kar.archidata.model.GenericTable; +import org.kar.archidata.model.GenericTableSoftDelete; import com.fasterxml.jackson.annotation.JsonInclude; @@ -21,7 +21,7 @@ import jakarta.persistence.Table; @Table(name = "user_link_application") @SQLIfNotExists @JsonInclude(JsonInclude.Include.NON_NULL) -public class UserLinkApplication extends GenericTable { +public class UserLinkApplication extends GenericTableSoftDelete { public long user_id; public long application_id; }