forked from kookmin-sw/cap-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from kookmin-sw/refactor/wsresponse
Refactor/wsresponse
- Loading branch information
Showing
9 changed files
with
138 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 10 additions & 1 deletion
11
src/main/java/capstone/facefriend/chat/service/dto/chatroom/ChatRoomLeftResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/main/java/capstone/facefriend/chat/service/dto/heart/HeartReplyResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 23 additions & 3 deletions
26
src/main/java/capstone/facefriend/chat/service/dto/heart/SendHeartResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,41 @@ | ||
package capstone.facefriend.chat.service.dto.heart; | ||
|
||
import capstone.facefriend.chat.domain.ChatRoom; | ||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import lombok.*; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDateTime; | ||
import java.util.LinkedHashMap; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class SendHeartResponse implements Serializable { | ||
private Long roomId; | ||
private Long senderId; | ||
private Long receiveId; | ||
private String method; | ||
private Long memberId; | ||
private String senderName; | ||
private Long senderId; | ||
private String type; | ||
private String senderGeneratedS3url; | ||
private String senderOriginS3url; | ||
private ChatRoom chatRoom; | ||
private String sessionId; | ||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "Asia/Seoul") | ||
private LocalDateTime createdAt; | ||
private boolean isSender; | ||
|
||
public SendHeartResponse(LinkedHashMap<String, Object> map, ChatRoom chatRoom) { | ||
this.method = (String) map.get("method"); | ||
this.memberId = ((Number) map.get("memberId")).longValue(); | ||
this.senderName = (String) map.get("senderName"); | ||
this.senderId = ((Number) map.get("senderId")).longValue(); // Fix this line | ||
this.type = (String) map.get("type"); | ||
this.senderGeneratedS3url = (String) map.get("senderGeneratedS3url"); | ||
this.senderOriginS3url = (String) map.get("senderOriginS3url"); | ||
this.sessionId = (String) map.get("sessionId"); | ||
this.createdAt = LocalDateTime.parse((String) map.get("createdAt")); | ||
this.isSender = (boolean) map.get("sender"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters