From 809055f4325fbae8b7fd2d93eac33730e0db6a5e Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Mon, 30 Jan 2023 23:01:06 +0100 Subject: [PATCH] new entity conversation --- .../com/covas/Entity/ConversationEntity.java | 19 +++++++++++++++++++ .../java/com/covas/Entity/UsersEntity.java | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/covas/Entity/ConversationEntity.java diff --git a/src/main/java/com/covas/Entity/ConversationEntity.java b/src/main/java/com/covas/Entity/ConversationEntity.java new file mode 100644 index 0000000..7679625 --- /dev/null +++ b/src/main/java/com/covas/Entity/ConversationEntity.java @@ -0,0 +1,19 @@ +package com.covas.Entity; + +import java.time.LocalDateTime; +import java.util.Collection; + +import io.quarkus.mongodb.panache.PanacheMongoEntity; +import io.quarkus.mongodb.panache.common.MongoEntity; + +@MongoEntity(collection="conversation") +public class ConversationEntity extends PanacheMongoEntity { + + + public Collection users; + public Short status; + + public LocalDateTime created_at; + public LocalDateTime updated_at; + public LocalDateTime deleted_at; +} diff --git a/src/main/java/com/covas/Entity/UsersEntity.java b/src/main/java/com/covas/Entity/UsersEntity.java index 6bae1fd..93918bc 100644 --- a/src/main/java/com/covas/Entity/UsersEntity.java +++ b/src/main/java/com/covas/Entity/UsersEntity.java @@ -105,8 +105,6 @@ public class UsersEntity extends PanacheEntityBase implements Serializable { users.created_at = LocalDateTime.now(); users.updated_at = LocalDateTime.now(); users.description = ""; - users.persist(); - } } \ No newline at end of file