@AllArgsConstructor(staticName = "of")
public class ChatRoomTo
{
- private UUID id;
+ private String id;
private String name;
private int shard;
public ChatRoomInfo toChatRoomInfo()
{
- return new ChatRoomInfo(id, name, shard);
+ return new ChatRoomInfo(UUID.fromString(id), name, shard);
}
public static ChatRoomTo from(ChatRoom chatRoom)
{
- return ChatRoomTo.of(chatRoom.getId(), chatRoom.getName(), chatRoom.getShard());
+ return ChatRoomTo.of(chatRoom.getId().toString(), chatRoom.getName(), chatRoom.getShard());
}
}