diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/adapter/out/persistence/DefaultCreatorChannelCommunityQueryRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/adapter/out/persistence/DefaultCreatorChannelCommunityQueryRepository.kt index 126c5695..9ee6efd3 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/adapter/out/persistence/DefaultCreatorChannelCommunityQueryRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/adapter/out/persistence/DefaultCreatorChannelCommunityQueryRepository.kt @@ -260,6 +260,7 @@ class DefaultCreatorChannelCommunityQueryRepository( creatorCommunityComment.member.profileImage, creatorCommunityComment.member.nickname, creatorCommunityComment.comment, + creatorCommunityComment.isSecret, creatorCommunityComment.createdAt ) @@ -556,6 +557,7 @@ class DefaultCreatorChannelCommunityQueryRepository( writerProfilePath = get(creatorCommunityComment.member.profileImage), writerNickname = get(creatorCommunityComment.member.nickname)!!, content = get(creatorCommunityComment.comment)!!, + isSecret = get(creatorCommunityComment.isSecret)!!, createdAt = get(creatorCommunityComment.createdAt)!! ) } diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryService.kt index ed2dce0e..1c3f3c5f 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryService.kt @@ -257,6 +257,7 @@ class CreatorChannelCommunityQueryService( writerProfileImageUrl = writerProfilePath.toCdnUrl(cloudFrontHost) ?: defaultProfileImageUrl(), writerNickname = writerNickname.removeDeletedNicknamePrefix(), content = content, + isSecret = isSecret, createdAt = createdAt, latestReply = latestReply ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/domain/CreatorChannelCommunityPostDetail.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/domain/CreatorChannelCommunityPostDetail.kt index e3e250e8..ac46b00d 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/domain/CreatorChannelCommunityPostDetail.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/domain/CreatorChannelCommunityPostDetail.kt @@ -21,6 +21,7 @@ data class CreatorChannelCommunityComment( val writerProfileImageUrl: String, val writerNickname: String, val content: String, + val isSecret: Boolean, val createdAt: LocalDateTime, val latestReply: CreatorChannelCommunityReply? ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/port/out/CreatorChannelCommunityQueryPort.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/port/out/CreatorChannelCommunityQueryPort.kt index 16536dba..d5cdd98c 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/port/out/CreatorChannelCommunityQueryPort.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/port/out/CreatorChannelCommunityQueryPort.kt @@ -106,6 +106,7 @@ data class CreatorChannelCommunityCommentRecord( val writerProfilePath: String?, val writerNickname: String, val content: String, + val isSecret: Boolean, val createdAt: LocalDateTime ) diff --git a/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryServiceTest.kt b/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryServiceTest.kt index 4f4d816e..6fd723c6 100644 --- a/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryServiceTest.kt +++ b/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryServiceTest.kt @@ -195,6 +195,7 @@ class CreatorChannelCommunityQueryServiceTest { assertEquals(20, detail.comments.comments.size) assertEquals(true, detail.comments.hasNext) assertEquals(101L, detail.comments.comments.first().writerId) + assertEquals(false, detail.comments.comments.first().isSecret) assertEquals("reply-writer", detail.comments.comments.first().latestReply?.writerNickname) assertEquals(200L, detail.comments.comments.first().latestReply?.writerId) assertEquals("https://cdn.test/profile/default-profile.png", detail.comments.comments.first().writerProfileImageUrl) @@ -237,6 +238,7 @@ class CreatorChannelCommunityQueryServiceTest { assertEquals(50, comments.comments.size) assertEquals(true, comments.hasNext) assertEquals(101L, comments.comments.first().writerId) + assertEquals(false, comments.comments.first().isSecret) assertEquals("https://cdn.test/profile/1.png", comments.comments.first().writerProfileImageUrl) assertEquals(100L, comments.comments[1].latestReply?.commentId) assertEquals(200L, comments.comments[1].latestReply?.writerId) @@ -499,7 +501,8 @@ private fun communityCommentRecord( commentId: Long, parentCommentId: Long? = null, writerProfilePath: String? = null, - writerNickname: String = "writer-$commentId" + writerNickname: String = "writer-$commentId", + isSecret: Boolean = false ): CreatorChannelCommunityCommentRecord { return CreatorChannelCommunityCommentRecord( commentId = commentId, @@ -509,6 +512,7 @@ private fun communityCommentRecord( writerProfilePath = writerProfilePath, writerNickname = writerNickname, content = "comment-$commentId", + isSecret = isSecret, createdAt = LocalDateTime.of(2026, 7, 6, 10, 0).plusMinutes(commentId) ) }