From 5ecbb189d18b0bc2e45cec597df72cd7d02198ed Mon Sep 17 00:00:00 2001 From: hyxklee Date: Fri, 8 Nov 2024 14:38:24 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=20=EC=8B=9C=EA=B0=84=20=EB=B0=98=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/user/dto/response/UserProfileResponse.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/leets/X/domain/user/dto/response/UserProfileResponse.java b/src/main/java/com/leets/X/domain/user/dto/response/UserProfileResponse.java index 3b11361..e3878ed 100644 --- a/src/main/java/com/leets/X/domain/user/dto/response/UserProfileResponse.java +++ b/src/main/java/com/leets/X/domain/user/dto/response/UserProfileResponse.java @@ -13,10 +13,12 @@ public record UserProfileResponse( String customId, Long followerCount, Long followingCount, - LocalDateTime createAt + Boolean isFollowing, + LocalDateTime createdAt, + LocalDateTime updatedAt ) { // 정적 팩토리 메서드 - public static UserProfileResponse from(User user, Boolean isMyProfile) { + public static UserProfileResponse from(User user, Boolean isMyProfile, Boolean isFollowing) { return UserProfileResponse.builder() .userId(user.getId()) .isMyProfile(isMyProfile) @@ -24,7 +26,9 @@ public static UserProfileResponse from(User user, Boolean isMyProfile) { .customId(user.getCustomId()) .followerCount(user.getFollowerCount()) .followingCount(user.getFollowingCount()) - .createAt(user.getCreatedAt()) + .isFollowing(isFollowing) + .createdAt(user.getCreatedAt()) + .updatedAt(user.getUpdatedAt()) .build(); } }