fix: 커뮤니티 댓글 조회
- 크리에이터가 아닌 경우 내가 쓴 비밀댓글 + 일반댓글만 조회되도록 수정
This commit is contained in:
parent
8e01ced1f5
commit
6d2f48f86d
|
@ -159,6 +159,7 @@ class CreatorCommunityController(private val service: CreatorCommunityService) {
|
||||||
ApiResponse.ok(
|
ApiResponse.ok(
|
||||||
service.getCommunityPostCommentList(
|
service.getCommunityPostCommentList(
|
||||||
postId = postId,
|
postId = postId,
|
||||||
|
memberId = member.id!!,
|
||||||
timezone = timezone,
|
timezone = timezone,
|
||||||
offset = pageable.offset,
|
offset = pageable.offset,
|
||||||
limit = pageable.pageSize.toLong()
|
limit = pageable.pageSize.toLong()
|
||||||
|
|
|
@ -28,6 +28,8 @@ interface CreatorCommunityQueryRepository {
|
||||||
fun getLatestPostListFromCreatorsYouFollow(memberId: Long, isAdult: Boolean): List<SelectCommunityPostResponse>
|
fun getLatestPostListFromCreatorsYouFollow(memberId: Long, isAdult: Boolean): List<SelectCommunityPostResponse>
|
||||||
|
|
||||||
fun getCommunityPost(postId: Long, isAdult: Boolean): SelectCommunityPostResponse?
|
fun getCommunityPost(postId: Long, isAdult: Boolean): SelectCommunityPostResponse?
|
||||||
|
|
||||||
|
fun isCommunityCreator(postId: Long, memberId: Long): Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
class CreatorCommunityQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : CreatorCommunityQueryRepository {
|
class CreatorCommunityQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : CreatorCommunityQueryRepository {
|
||||||
|
@ -195,4 +197,17 @@ class CreatorCommunityQueryRepositoryImpl(private val queryFactory: JPAQueryFact
|
||||||
.where(where)
|
.where(where)
|
||||||
.fetchFirst()
|
.fetchFirst()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun isCommunityCreator(postId: Long, memberId: Long): Boolean {
|
||||||
|
return queryFactory
|
||||||
|
.select(member.id)
|
||||||
|
.from(creatorCommunity)
|
||||||
|
.innerJoin(creatorCommunity.member, member)
|
||||||
|
.where(
|
||||||
|
creatorCommunity.id.eq(postId)
|
||||||
|
.and(creatorCommunity.isActive.isTrue)
|
||||||
|
.and(member.id.eq(memberId))
|
||||||
|
)
|
||||||
|
.fetchFirst() != null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,15 +190,20 @@ class CreatorCommunityService(
|
||||||
?: false
|
?: false
|
||||||
val likeCount = likeRepository.totalCountCommunityPostLikeByPostId(it.id)
|
val likeCount = likeRepository.totalCountCommunityPostLikeByPostId(it.id)
|
||||||
val commentCount = if (it.isCommentAvailable) {
|
val commentCount = if (it.isCommentAvailable) {
|
||||||
commentRepository.totalCountCommentByPostId(postId = it.id)
|
commentRepository.totalCountCommentByPostId(
|
||||||
|
postId = it.id,
|
||||||
|
memberId = memberId,
|
||||||
|
isContentCreator = it.creatorId == memberId
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
val commentList = if (it.isCommentAvailable) {
|
val commentList = if (it.isCommentAvailable) {
|
||||||
commentRepository.findByPostId(
|
commentRepository.findByPostId(
|
||||||
cloudFrontHost = imageHost,
|
|
||||||
timezone = timezone,
|
|
||||||
id = it.id,
|
id = it.id,
|
||||||
|
memberId = memberId,
|
||||||
|
isContentCreator = it.creatorId == memberId,
|
||||||
|
timezone = timezone,
|
||||||
offset = 0,
|
offset = 0,
|
||||||
limit = 1
|
limit = 1
|
||||||
)
|
)
|
||||||
|
@ -263,15 +268,20 @@ class CreatorCommunityService(
|
||||||
val isLike = likeRepository.findByPostIdAndMemberId(postId = post.id, memberId = memberId)?.isActive ?: false
|
val isLike = likeRepository.findByPostIdAndMemberId(postId = post.id, memberId = memberId)?.isActive ?: false
|
||||||
val likeCount = likeRepository.totalCountCommunityPostLikeByPostId(post.id)
|
val likeCount = likeRepository.totalCountCommunityPostLikeByPostId(post.id)
|
||||||
val commentCount = if (post.isCommentAvailable) {
|
val commentCount = if (post.isCommentAvailable) {
|
||||||
commentRepository.totalCountCommentByPostId(postId = post.id)
|
commentRepository.totalCountCommentByPostId(
|
||||||
|
postId = post.id,
|
||||||
|
memberId = memberId,
|
||||||
|
isContentCreator = post.creatorId == memberId
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
val commentList = if (post.isCommentAvailable) {
|
val commentList = if (post.isCommentAvailable) {
|
||||||
commentRepository.findByPostId(
|
commentRepository.findByPostId(
|
||||||
cloudFrontHost = imageHost,
|
|
||||||
timezone = timezone,
|
|
||||||
id = post.id,
|
id = post.id,
|
||||||
|
memberId = memberId,
|
||||||
|
isContentCreator = post.creatorId == memberId,
|
||||||
|
timezone = timezone,
|
||||||
offset = 0,
|
offset = 0,
|
||||||
limit = 1
|
limit = 1
|
||||||
)
|
)
|
||||||
|
@ -401,19 +411,25 @@ class CreatorCommunityService(
|
||||||
|
|
||||||
fun getCommunityPostCommentList(
|
fun getCommunityPostCommentList(
|
||||||
postId: Long,
|
postId: Long,
|
||||||
|
memberId: Long,
|
||||||
timezone: String,
|
timezone: String,
|
||||||
offset: Long,
|
offset: Long,
|
||||||
limit: Long
|
limit: Long
|
||||||
): GetCommunityPostCommentListResponse {
|
): GetCommunityPostCommentListResponse {
|
||||||
val commentList = commentRepository.findByPostId(
|
val commentList = commentRepository.findByPostId(
|
||||||
cloudFrontHost = imageHost,
|
|
||||||
timezone = timezone,
|
|
||||||
id = postId,
|
id = postId,
|
||||||
|
memberId = memberId,
|
||||||
|
isContentCreator = repository.isCommunityCreator(postId, memberId),
|
||||||
|
timezone = timezone,
|
||||||
offset = offset,
|
offset = offset,
|
||||||
limit = limit
|
limit = limit
|
||||||
)
|
)
|
||||||
|
|
||||||
val totalCount = commentRepository.totalCountCommentByPostId(postId = postId)
|
val totalCount = commentRepository.totalCountCommentByPostId(
|
||||||
|
postId = postId,
|
||||||
|
memberId = memberId,
|
||||||
|
isContentCreator = repository.isCommunityCreator(postId, memberId)
|
||||||
|
)
|
||||||
return GetCommunityPostCommentListResponse(totalCount = totalCount, items = commentList)
|
return GetCommunityPostCommentListResponse(totalCount = totalCount, items = commentList)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -424,7 +440,6 @@ class CreatorCommunityService(
|
||||||
limit: Long
|
limit: Long
|
||||||
): GetCommunityPostCommentListResponse {
|
): GetCommunityPostCommentListResponse {
|
||||||
val commentList = commentRepository.getCommunityCommentReplyList(
|
val commentList = commentRepository.getCommunityCommentReplyList(
|
||||||
cloudFrontHost = imageHost,
|
|
||||||
commentId = commentId,
|
commentId = commentId,
|
||||||
timezone = timezone,
|
timezone = timezone,
|
||||||
offset = offset,
|
offset = offset,
|
||||||
|
@ -454,15 +469,20 @@ class CreatorCommunityService(
|
||||||
likeRepository.findByPostIdAndMemberId(postId = it.id, memberId = memberId)?.isActive ?: false
|
likeRepository.findByPostIdAndMemberId(postId = it.id, memberId = memberId)?.isActive ?: false
|
||||||
val likeCount = likeRepository.totalCountCommunityPostLikeByPostId(it.id)
|
val likeCount = likeRepository.totalCountCommunityPostLikeByPostId(it.id)
|
||||||
val commentCount = if (it.isCommentAvailable) {
|
val commentCount = if (it.isCommentAvailable) {
|
||||||
commentRepository.totalCountCommentByPostId(postId = it.id)
|
commentRepository.totalCountCommentByPostId(
|
||||||
|
postId = it.id,
|
||||||
|
memberId = memberId,
|
||||||
|
isContentCreator = it.creatorId == memberId
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
val commentList = if (it.isCommentAvailable) {
|
val commentList = if (it.isCommentAvailable) {
|
||||||
commentRepository.findByPostId(
|
commentRepository.findByPostId(
|
||||||
cloudFrontHost = imageHost,
|
|
||||||
timezone = timezone,
|
|
||||||
id = it.id,
|
id = it.id,
|
||||||
|
memberId = memberId,
|
||||||
|
isContentCreator = it.creatorId == memberId,
|
||||||
|
timezone = timezone,
|
||||||
offset = 0,
|
offset = 0,
|
||||||
limit = 1
|
limit = 1
|
||||||
)
|
)
|
||||||
|
@ -525,15 +545,20 @@ class CreatorCommunityService(
|
||||||
val isLike = likeRepository.findByPostIdAndMemberId(postId = post.id!!, memberId = memberId)?.isActive ?: false
|
val isLike = likeRepository.findByPostIdAndMemberId(postId = post.id!!, memberId = memberId)?.isActive ?: false
|
||||||
val likeCount = likeRepository.totalCountCommunityPostLikeByPostId(post.id!!)
|
val likeCount = likeRepository.totalCountCommunityPostLikeByPostId(post.id!!)
|
||||||
val commentCount = if (post.isCommentAvailable) {
|
val commentCount = if (post.isCommentAvailable) {
|
||||||
commentRepository.totalCountCommentByPostId(postId = post.id!!)
|
commentRepository.totalCountCommentByPostId(
|
||||||
|
postId = post.id!!,
|
||||||
|
memberId = memberId,
|
||||||
|
isContentCreator = false
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
val commentList = if (post.isCommentAvailable) {
|
val commentList = if (post.isCommentAvailable) {
|
||||||
commentRepository.findByPostId(
|
commentRepository.findByPostId(
|
||||||
cloudFrontHost = imageHost,
|
|
||||||
timezone = timezone,
|
|
||||||
id = post.id!!,
|
id = post.id!!,
|
||||||
|
memberId = memberId,
|
||||||
|
isContentCreator = false,
|
||||||
|
timezone = timezone,
|
||||||
offset = 0,
|
offset = 0,
|
||||||
limit = 1
|
limit = 1
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,29 +1,34 @@
|
||||||
package kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.comment
|
package kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.comment
|
||||||
|
|
||||||
|
import com.querydsl.core.types.dsl.Expressions
|
||||||
import com.querydsl.jpa.impl.JPAQueryFactory
|
import com.querydsl.jpa.impl.JPAQueryFactory
|
||||||
import kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.comment.QCreatorCommunityComment.creatorCommunityComment
|
import kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.comment.QCreatorCommunityComment.creatorCommunityComment
|
||||||
|
import org.springframework.beans.factory.annotation.Value
|
||||||
import org.springframework.data.jpa.repository.JpaRepository
|
import org.springframework.data.jpa.repository.JpaRepository
|
||||||
import java.time.ZoneId
|
import java.time.LocalDateTime
|
||||||
import java.time.format.DateTimeFormatter
|
|
||||||
|
|
||||||
interface CreatorCommunityCommentRepository :
|
interface CreatorCommunityCommentRepository :
|
||||||
JpaRepository<CreatorCommunityComment, Long>, CreatorCommunityCommentQueryRepository
|
JpaRepository<CreatorCommunityComment, Long>, CreatorCommunityCommentQueryRepository
|
||||||
|
|
||||||
interface CreatorCommunityCommentQueryRepository {
|
interface CreatorCommunityCommentQueryRepository {
|
||||||
fun findByPostId(
|
fun findByPostId(
|
||||||
cloudFrontHost: String,
|
|
||||||
timezone: String,
|
|
||||||
id: Long,
|
id: Long,
|
||||||
|
memberId: Long,
|
||||||
|
isContentCreator: Boolean,
|
||||||
|
timezone: String,
|
||||||
offset: Long,
|
offset: Long,
|
||||||
limit: Long
|
limit: Long
|
||||||
): List<GetCommunityPostCommentListItem>
|
): List<GetCommunityPostCommentListItem>
|
||||||
|
|
||||||
fun commentReplyCountByCommentId(commentId: Long): Int
|
fun commentReplyCountByCommentId(commentId: Long): Int
|
||||||
|
|
||||||
fun totalCountCommentByPostId(postId: Long): Int
|
fun totalCountCommentByPostId(
|
||||||
|
postId: Long,
|
||||||
|
memberId: Long,
|
||||||
|
isContentCreator: Boolean
|
||||||
|
): Int
|
||||||
|
|
||||||
fun getCommunityCommentReplyList(
|
fun getCommunityCommentReplyList(
|
||||||
cloudFrontHost: String,
|
|
||||||
commentId: Long,
|
commentId: Long,
|
||||||
timezone: String,
|
timezone: String,
|
||||||
offset: Long,
|
offset: Long,
|
||||||
|
@ -32,47 +37,64 @@ interface CreatorCommunityCommentQueryRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
class CreatorCommunityCommentQueryRepositoryImpl(
|
class CreatorCommunityCommentQueryRepositoryImpl(
|
||||||
private val queryFactory: JPAQueryFactory
|
private val queryFactory: JPAQueryFactory,
|
||||||
|
|
||||||
|
@Value("\${cloud.aws.cloud-front.host}")
|
||||||
|
private val imageHost: String
|
||||||
) : CreatorCommunityCommentQueryRepository {
|
) : CreatorCommunityCommentQueryRepository {
|
||||||
override fun findByPostId(
|
override fun findByPostId(
|
||||||
cloudFrontHost: String,
|
|
||||||
timezone: String,
|
|
||||||
id: Long,
|
id: Long,
|
||||||
|
memberId: Long,
|
||||||
|
isContentCreator: Boolean,
|
||||||
|
timezone: String,
|
||||||
offset: Long,
|
offset: Long,
|
||||||
limit: Long
|
limit: Long
|
||||||
): List<GetCommunityPostCommentListItem> {
|
): List<GetCommunityPostCommentListItem> {
|
||||||
return queryFactory
|
val formattedDate = Expressions.stringTemplate(
|
||||||
.selectFrom(creatorCommunityComment)
|
"DATE_FORMAT({0}, {1})",
|
||||||
.where(
|
Expressions.dateTimeTemplate(
|
||||||
creatorCommunityComment.isActive.isTrue
|
LocalDateTime::class.java,
|
||||||
|
"CONVERT_TZ({0},{1},{2})",
|
||||||
|
creatorCommunityComment.createdAt,
|
||||||
|
"UTC",
|
||||||
|
timezone
|
||||||
|
),
|
||||||
|
"%Y.%m.%d %W %h:%i %p"
|
||||||
|
)
|
||||||
|
|
||||||
|
var where = creatorCommunityComment.isActive.isTrue
|
||||||
.and(creatorCommunityComment.creatorCommunity.id.eq(id))
|
.and(creatorCommunityComment.creatorCommunity.id.eq(id))
|
||||||
.and(creatorCommunityComment.parent.isNull)
|
.and(creatorCommunityComment.parent.isNull)
|
||||||
|
|
||||||
|
if (!isContentCreator) {
|
||||||
|
where = where.and(
|
||||||
|
creatorCommunityComment.isSecret.isFalse
|
||||||
|
.or(creatorCommunityComment.member.id.eq(memberId))
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return queryFactory
|
||||||
|
.select(
|
||||||
|
QGetCommunityPostCommentListItem(
|
||||||
|
creatorCommunityComment.id,
|
||||||
|
creatorCommunityComment.member.id,
|
||||||
|
creatorCommunityComment.member.nickname,
|
||||||
|
creatorCommunityComment.member.profileImage.prepend(imageHost),
|
||||||
|
creatorCommunityComment.comment,
|
||||||
|
formattedDate,
|
||||||
|
Expressions.constant(0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.from(creatorCommunityComment)
|
||||||
|
.where(where)
|
||||||
.offset(offset)
|
.offset(offset)
|
||||||
.limit(limit)
|
.limit(limit)
|
||||||
.orderBy(creatorCommunityComment.createdAt.desc())
|
.orderBy(creatorCommunityComment.createdAt.desc())
|
||||||
.fetch()
|
.fetch()
|
||||||
.asSequence()
|
|
||||||
.map {
|
.map {
|
||||||
val date = it.createdAt!!
|
it.replyCount = commentReplyCountByCommentId(it.id)
|
||||||
.atZone(ZoneId.of("UTC"))
|
it
|
||||||
.withZoneSameInstant(ZoneId.of(timezone))
|
|
||||||
|
|
||||||
GetCommunityPostCommentListItem(
|
|
||||||
id = it.id!!,
|
|
||||||
writerId = it.member!!.id!!,
|
|
||||||
nickname = it.member!!.nickname,
|
|
||||||
profileUrl = if (it.member!!.profileImage != null) {
|
|
||||||
"$cloudFrontHost/${it.member!!.profileImage}"
|
|
||||||
} else {
|
|
||||||
"$cloudFrontHost/profile/default-profile.png"
|
|
||||||
},
|
|
||||||
comment = it.comment,
|
|
||||||
date = date.format(DateTimeFormatter.ofPattern("yyyy.MM.dd E hh:mm a")),
|
|
||||||
replyCount = commentReplyCountByCommentId(it.id!!)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
.toList()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun commentReplyCountByCommentId(commentId: Long): Int {
|
override fun commentReplyCountByCommentId(commentId: Long): Int {
|
||||||
|
@ -87,27 +109,60 @@ class CreatorCommunityCommentQueryRepositoryImpl(
|
||||||
.size
|
.size
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun totalCountCommentByPostId(postId: Long): Int {
|
override fun totalCountCommentByPostId(
|
||||||
return queryFactory.select(creatorCommunityComment.id)
|
postId: Long,
|
||||||
.from(creatorCommunityComment)
|
memberId: Long,
|
||||||
.where(
|
isContentCreator: Boolean
|
||||||
creatorCommunityComment.creatorCommunity.id.eq(postId)
|
): Int {
|
||||||
|
var where = creatorCommunityComment.creatorCommunity.id.eq(postId)
|
||||||
.and(creatorCommunityComment.isActive.isTrue)
|
.and(creatorCommunityComment.isActive.isTrue)
|
||||||
.and(creatorCommunityComment.parent.isNull)
|
.and(creatorCommunityComment.parent.isNull)
|
||||||
|
|
||||||
|
if (!isContentCreator) {
|
||||||
|
where = where.and(
|
||||||
|
creatorCommunityComment.isSecret.isFalse
|
||||||
|
.or(creatorCommunityComment.member.id.eq(memberId))
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return queryFactory.select(creatorCommunityComment.id)
|
||||||
|
.from(creatorCommunityComment)
|
||||||
|
.where(where)
|
||||||
.fetch()
|
.fetch()
|
||||||
.size
|
.size
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getCommunityCommentReplyList(
|
override fun getCommunityCommentReplyList(
|
||||||
cloudFrontHost: String,
|
|
||||||
commentId: Long,
|
commentId: Long,
|
||||||
timezone: String,
|
timezone: String,
|
||||||
offset: Long,
|
offset: Long,
|
||||||
limit: Long
|
limit: Long
|
||||||
): List<GetCommunityPostCommentListItem> {
|
): List<GetCommunityPostCommentListItem> {
|
||||||
|
val formattedDate = Expressions.stringTemplate(
|
||||||
|
"DATE_FORMAT({0}, {1})",
|
||||||
|
Expressions.dateTimeTemplate(
|
||||||
|
LocalDateTime::class.java,
|
||||||
|
"CONVERT_TZ({0},{1},{2})",
|
||||||
|
creatorCommunityComment.createdAt,
|
||||||
|
"UTC",
|
||||||
|
timezone
|
||||||
|
),
|
||||||
|
"%Y.%m.%d %W %h:%i %p"
|
||||||
|
)
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.selectFrom(creatorCommunityComment)
|
.select(
|
||||||
|
QGetCommunityPostCommentListItem(
|
||||||
|
creatorCommunityComment.id,
|
||||||
|
creatorCommunityComment.member.id,
|
||||||
|
creatorCommunityComment.member.nickname,
|
||||||
|
creatorCommunityComment.member.profileImage.prepend(imageHost),
|
||||||
|
creatorCommunityComment.comment,
|
||||||
|
formattedDate,
|
||||||
|
Expressions.constant(0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.from(creatorCommunityComment)
|
||||||
.where(
|
.where(
|
||||||
creatorCommunityComment.isActive.isTrue
|
creatorCommunityComment.isActive.isTrue
|
||||||
.and(creatorCommunityComment.parent.isNotNull)
|
.and(creatorCommunityComment.parent.isNotNull)
|
||||||
|
@ -117,26 +172,5 @@ class CreatorCommunityCommentQueryRepositoryImpl(
|
||||||
.limit(limit)
|
.limit(limit)
|
||||||
.orderBy(creatorCommunityComment.createdAt.desc())
|
.orderBy(creatorCommunityComment.createdAt.desc())
|
||||||
.fetch()
|
.fetch()
|
||||||
.asSequence()
|
|
||||||
.map {
|
|
||||||
val date = it.createdAt!!
|
|
||||||
.atZone(ZoneId.of("UTC"))
|
|
||||||
.withZoneSameInstant(ZoneId.of(timezone))
|
|
||||||
|
|
||||||
GetCommunityPostCommentListItem(
|
|
||||||
id = it.id!!,
|
|
||||||
writerId = it.member!!.id!!,
|
|
||||||
nickname = it.member!!.nickname,
|
|
||||||
profileUrl = if (it.member!!.profileImage != null) {
|
|
||||||
"$cloudFrontHost/${it.member!!.profileImage}"
|
|
||||||
} else {
|
|
||||||
"$cloudFrontHost/profile/default-profile.png"
|
|
||||||
},
|
|
||||||
comment = it.comment,
|
|
||||||
date = date.format(DateTimeFormatter.ofPattern("yyyy.MM.dd E hh:mm a")),
|
|
||||||
replyCount = commentReplyCountByCommentId(it.id!!)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
.toList()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
package kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.comment
|
package kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.comment
|
||||||
|
|
||||||
|
import com.querydsl.core.annotations.QueryProjection
|
||||||
|
|
||||||
data class GetCommunityPostCommentListResponse(
|
data class GetCommunityPostCommentListResponse(
|
||||||
val totalCount: Int,
|
val totalCount: Int,
|
||||||
val items: List<GetCommunityPostCommentListItem>
|
val items: List<GetCommunityPostCommentListItem>
|
||||||
)
|
)
|
||||||
|
|
||||||
data class GetCommunityPostCommentListItem(
|
data class GetCommunityPostCommentListItem @QueryProjection constructor(
|
||||||
val id: Long,
|
val id: Long,
|
||||||
val writerId: Long,
|
val writerId: Long,
|
||||||
val nickname: String,
|
val nickname: String,
|
||||||
val profileUrl: String,
|
val profileUrl: String,
|
||||||
val comment: String,
|
val comment: String,
|
||||||
val date: String,
|
val date: String,
|
||||||
val replyCount: Int
|
var replyCount: Int
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue