new property for event

This commit is contained in:
Valentin CZERYBA 2023-01-15 21:10:23 +01:00
parent 96bd7dec0e
commit ee446fceb2
3 changed files with 13 additions and 2 deletions

View File

@ -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<String> interesses;
public String reservation;
public Confidentialite confidentialite;
public LocalDateTime created_at;
public LocalDateTime updated_at;
public LocalDateTime deleted_at;

View File

@ -0,0 +1,6 @@
package com.covas.Enum;
public enum Confidentialite {
PUBLIC, FRIEND, PRIVATE
}

View File

@ -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();