From 23a46b4be35277e06ec89f48730eeb694e686be8 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Thu, 18 Jun 2026 15:40:06 +0000
Subject: [PATCH] add fdx-commons and fdx-consultation
---
fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/integration/json/JsonStructure.java | 77 ++++++++++++++++++++++++++++++++++++++
1 files changed, 77 insertions(+), 0 deletions(-)
diff --git a/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/integration/json/JsonStructure.java b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/integration/json/JsonStructure.java
new file mode 100644
index 0000000..a32a3ab
--- /dev/null
+++ b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/integration/json/JsonStructure.java
@@ -0,0 +1,77 @@
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package com.megatim.fdxcommons.model.integration.json;
+
+import com.megatim.fdxcommons.model.enumeration.TypeDonnee;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import javax.persistence.*;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ *
+ * @author ASUS
+ */
+@Getter
+@Setter
+@Entity
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.FIELD)
+public class JsonStructure implements Serializable {
+
+ @Id
+ @SequenceGenerator(name = "SEQ_TYPE_FICHIER_JSON", sequenceName = "SEQ_TYPE_FICHIER_JSON", allocationSize = 1, initialValue = 1)
+ @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_TYPE_FICHIER_JSON")
+ @XmlTransient
+ private Long id;
+
+ @NotNull(message = "Le type de données est obligatoire")
+ @Enumerated(EnumType.STRING)
+ @XmlAttribute
+ private TypeDonnee typeDonnee;
+
+ @NotNull(message = "Le nom est obligatoire")
+ @XmlAttribute
+ private String name;
+
+ @Min(value = 1, message = "La taille doit être supérieure à 0")
+ @XmlAttribute
+ private int lengthh;
+
+ @XmlAttribute
+ private boolean required;
+
+ @XmlAttribute
+ private boolean collection;
+
+ @XmlAttribute
+ private String formatDate;
+
+ @XmlAttribute
+ private String codeDelimiteurDate;
+
+ @OneToOne
+ @XmlTransient
+ private TypeFichierJson typeFichierJson;
+
+ @ManyToOne
+ @XmlTransient
+ private JsonStructure parent;
+
+ @OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, orphanRemoval = true)
+ @XmlElement(name = "jsonStructure")
+ private List<JsonStructure> fields = new ArrayList<>();
+
+}
--
Gitblit v1.10.0