Skip to content

Commit

Permalink
feat: MessageDto add profileImage
Browse files Browse the repository at this point in the history
  • Loading branch information
kcm0147 committed Jun 2, 2021
1 parent 7590b27 commit 81cab30
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.text.DateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import javax.persistence.Lob;
import lombok.Data;
import lombok.Getter;

Expand All @@ -15,6 +16,7 @@ public class MessageDto {
private String content;
private String userName;
private String writtenAt;
private String profileImage;
private int unreadCnt;

DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
Expand All @@ -33,6 +35,7 @@ public MessageDto(Message message){
this.roomId = message.getRoom().getRoomId();
this.content = message.getContent();
this.userName = message.getUser().getName();
this.profileImage=message.getUser().getProfileImage();
this.writtenAt = message.getWrittenAt().format(formatter);
this.unreadCnt = message.getUnreadCnt();
}
Expand Down

0 comments on commit 81cab30

Please sign in to comment.