From f0f410fb9a50ce6c4efc5d7c403f059301eef3ab Mon Sep 17 00:00:00 2001 From: xhaktmchl Date: Mon, 21 Nov 2022 22:33:38 +0900 Subject: [PATCH] =?UTF-8?q?#16=20fix:=20Chatting=EC=97=94=ED=8B=B0?= =?UTF-8?q?=ED=8B=B0=20nickName,=20profileImgUrl=20=EB=B3=80=EC=88=98?= =?UTF-8?q?=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/shop/geeksasangchat/domain/Chatting.java | 14 +++++++------- .../geeksasangchat/domain/PartyChattingRoom.java | 3 --- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/shop/geeksasangchat/domain/Chatting.java b/src/main/java/shop/geeksasangchat/domain/Chatting.java index 6383f4d..7a4c099 100644 --- a/src/main/java/shop/geeksasangchat/domain/Chatting.java +++ b/src/main/java/shop/geeksasangchat/domain/Chatting.java @@ -16,7 +16,7 @@ @Document //@Document는객체를 몽고DB에 영속화시킴 = SpringDataJpa의 @Entity와 같은 역할 @ToString @Getter -public class Chatting implements Serializable { +public class Chatting implements Serializable { @Id public String id; @@ -28,9 +28,9 @@ public class Chatting implements Serializable { private Boolean isSystemMessage; - private String senderNickName; + private String nickName; - private String senderImgUrl; + private String profileImgUrl; private List readMembers = new ArrayList<>(); // 읽은 멤버 리스트 @@ -42,14 +42,14 @@ public Chatting(String content) { this.baseEntity = new BaseEntity(); } - public Chatting(String content, PartyChattingRoom partyChattingRoom, Boolean isSystemMessage, String senderNickName, String senderImgUrl, List readMembers) { + public Chatting(String content, PartyChattingRoom partyChattingRoom, Boolean isSystemMessage, String nickName, String profileImgUrl, List readMembers, BaseEntity baseEntity) { this.content = content; this.partyChattingRoom = partyChattingRoom; this.isSystemMessage = isSystemMessage; - this.senderNickName = senderNickName; - this.senderImgUrl = senderImgUrl; + this.nickName = nickName; + this.profileImgUrl = profileImgUrl; this.readMembers = readMembers; - this.baseEntity = new BaseEntity(); + this.baseEntity = baseEntity; } } diff --git a/src/main/java/shop/geeksasangchat/domain/PartyChattingRoom.java b/src/main/java/shop/geeksasangchat/domain/PartyChattingRoom.java index 78f1600..8714344 100644 --- a/src/main/java/shop/geeksasangchat/domain/PartyChattingRoom.java +++ b/src/main/java/shop/geeksasangchat/domain/PartyChattingRoom.java @@ -16,12 +16,9 @@ public class PartyChattingRoom extends ChattingRoom{ private String title; //TODO:채팅과 일대다 연관관계 테스트 중 -// @DBRef -// private List chattings; @DocumentReference // 일대다 private List chattings = new ArrayList<>(); -// @DocumentReference // 일대다 private List participants = new ArrayList<>(); // private String accountNumber;