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 #66 from kookmin-sw/refactor/leftchatroom
Refactor/leftchatroom
- Loading branch information
Showing
5 changed files
with
53 additions
and
21 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
17 changes: 17 additions & 0 deletions
17
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package capstone.facefriend.chat.service.dto.chatroom; | ||
|
||
import capstone.facefriend.member.domain.member.Member; | ||
|
||
public record ChatRoomLeftResponse ( | ||
Long senderId, | ||
String senderNickname, | ||
String content | ||
){ | ||
public static ChatRoomLeftResponse of (Member sender, String content) { | ||
return new ChatRoomLeftResponse( | ||
sender.getId(), | ||
sender.getBasicInfo().getNickname(), | ||
content | ||
); | ||
} | ||
} |
13 changes: 4 additions & 9 deletions
13
src/main/java/capstone/facefriend/chat/service/dto/heart/HeartReplyRequest.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,11 +1,6 @@ | ||
package capstone.facefriend.chat.service.dto.heart; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class HeartReplyRequest { | ||
Long senderId; | ||
String intention; | ||
} | ||
public record HeartReplyRequest( | ||
Long senderId, | ||
String intention | ||
) {} |
13 changes: 13 additions & 0 deletions
13
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package capstone.facefriend.chat.service.dto.heart; | ||
|
||
public record HeartReplyResponse( | ||
Long senderId, | ||
String intention | ||
) { | ||
public static HeartReplyResponse of (Long senderId, HeartReplyRequest heartReplyRequest) { | ||
return new HeartReplyResponse( | ||
senderId, | ||
heartReplyRequest.intention() | ||
); | ||
} | ||
} |