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;