-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
69 additions
and
0 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
37 changes: 37 additions & 0 deletions
37
...va/toy/bookchat/bookchat/domain/chatroom/api/dto/response/UserChatRoomDetailResponse.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,37 @@ | ||
package toy.bookchat.bookchat.domain.chatroom.api.dto.response; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import toy.bookchat.bookchat.domain.chatroom.ChatRoom; | ||
|
||
@Getter | ||
public class UserChatRoomDetailResponse { | ||
|
||
private Long roomId; | ||
private String roomName; | ||
private String roomSid; | ||
private Long roomMemberCount; | ||
private String roomImageUri; | ||
private Integer defaultRoomImageType; | ||
|
||
@Builder | ||
private UserChatRoomDetailResponse(Long roomId, String roomName, String roomSid, Long roomMemberCount, String roomImageUri, Integer defaultRoomImageType) { | ||
this.roomId = roomId; | ||
this.roomName = roomName; | ||
this.roomSid = roomSid; | ||
this.roomImageUri = roomImageUri; | ||
this.defaultRoomImageType = defaultRoomImageType; | ||
this.roomMemberCount = roomMemberCount; | ||
} | ||
|
||
public static UserChatRoomDetailResponse from(ChatRoom chatroom, Long roomMemberCount) { | ||
return UserChatRoomDetailResponse.builder() | ||
.roomId(chatroom.getId()) | ||
.roomName(chatroom.getRoomName()) | ||
.roomSid(chatroom.getRoomSid()) | ||
.roomImageUri(chatroom.getRoomImageUri()) | ||
.defaultRoomImageType(chatroom.getDefaultRoomImageType()) | ||
.roomMemberCount(roomMemberCount) | ||
.build(); | ||
} | ||
} |
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
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