From ee446fceb246d89ab8b5edef7160f50a5958a4cf Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sun, 15 Jan 2023 21:10:23 +0100 Subject: [PATCH] new property for event --- src/main/java/com/covas/Entity/EventEntity.java | 5 +++++ src/main/java/com/covas/Enum/Confidentialite.java | 6 ++++++ src/main/java/com/covas/Resources/EventRessources.java | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/covas/Enum/Confidentialite.java diff --git a/src/main/java/com/covas/Entity/EventEntity.java b/src/main/java/com/covas/Entity/EventEntity.java index b4b931b..b028523 100644 --- a/src/main/java/com/covas/Entity/EventEntity.java +++ b/src/main/java/com/covas/Entity/EventEntity.java @@ -3,6 +3,7 @@ package com.covas.Entity; import java.time.LocalDateTime; import java.util.Collection; +import com.covas.Enum.Confidentialite; import com.covas.Json.Organisateurs; import io.quarkus.mongodb.panache.PanacheMongoEntity; @@ -23,6 +24,10 @@ public class EventEntity extends PanacheMongoEntity { public Collection interesses; + public String reservation; + + public Confidentialite confidentialite; + public LocalDateTime created_at; public LocalDateTime updated_at; public LocalDateTime deleted_at; diff --git a/src/main/java/com/covas/Enum/Confidentialite.java b/src/main/java/com/covas/Enum/Confidentialite.java new file mode 100644 index 0000000..77ec12d --- /dev/null +++ b/src/main/java/com/covas/Enum/Confidentialite.java @@ -0,0 +1,6 @@ +package com.covas.Enum; + +public enum Confidentialite { + PUBLIC, FRIEND, PRIVATE + +} diff --git a/src/main/java/com/covas/Resources/EventRessources.java b/src/main/java/com/covas/Resources/EventRessources.java index 975d8cf..38f51b4 100644 --- a/src/main/java/com/covas/Resources/EventRessources.java +++ b/src/main/java/com/covas/Resources/EventRessources.java @@ -4,8 +4,6 @@ import java.nio.charset.StandardCharsets; import java.time.LocalDateTime; import java.util.List; import java.util.UUID; -import java.util.ArrayList; -import java.util.Collection; import javax.annotation.security.RolesAllowed; @@ -156,6 +154,8 @@ public class EventRessources { newEvent.name = event.name; newEvent.address = event.address; newEvent.organisateurs = event.organisateurs; + newEvent.reservation = event.reservation; + newEvent.confidentialite = event.confidentialite; newEvent.created_at = LocalDateTime.now(); newEvent.updated_at = LocalDateTime.now(); newEvent.persist();