From a72ab4d7d65b5fde57e77bed6531ba061279b6db Mon Sep 17 00:00:00 2001 From: Hanna Lee <8annahxxl@gmail.com> Date: Mon, 4 Mar 2024 12:03:15 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20bundle=20originId=20=EC=9D=91=EB=8B=B5?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kw/api/domain/bundle/dto/response/BundleDetailResponse.kt | 4 +++- .../com/kw/api/domain/bundle/dto/response/BundleResponse.kt | 2 ++ .../kotlin/com/kw/api/domain/bundle/service/BundleService.kt | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/api/src/main/kotlin/com/kw/api/domain/bundle/dto/response/BundleDetailResponse.kt b/server/api/src/main/kotlin/com/kw/api/domain/bundle/dto/response/BundleDetailResponse.kt index 35d9ac6..2bac0ce 100644 --- a/server/api/src/main/kotlin/com/kw/api/domain/bundle/dto/response/BundleDetailResponse.kt +++ b/server/api/src/main/kotlin/com/kw/api/domain/bundle/dto/response/BundleDetailResponse.kt @@ -13,7 +13,8 @@ data class BundleDetailResponse( val tags: List? = null, val questions: List? = null, val createdAt: LocalDateTime? = null, - val updatedAt: LocalDateTime? = null + val updatedAt: LocalDateTime? = null, + val originId: Long? = null ) { companion object { fun from(bundle: Bundle, questions: List): BundleDetailResponse { @@ -23,6 +24,7 @@ data class BundleDetailResponse( shareType = bundle.shareType.name, tags = bundle.bundleTags.map { it.tag }.map { TagResponse.from(it) }, questions = questions.map { QuestionResponse.from(it) }, + originId = bundle.originId, createdAt = bundle.createdAt, updatedAt = bundle.updatedAt ) diff --git a/server/api/src/main/kotlin/com/kw/api/domain/bundle/dto/response/BundleResponse.kt b/server/api/src/main/kotlin/com/kw/api/domain/bundle/dto/response/BundleResponse.kt index cd92a6e..8441160 100644 --- a/server/api/src/main/kotlin/com/kw/api/domain/bundle/dto/response/BundleResponse.kt +++ b/server/api/src/main/kotlin/com/kw/api/domain/bundle/dto/response/BundleResponse.kt @@ -11,6 +11,7 @@ data class BundleResponse( val scrapeCount: Long, val tags: List, val isHot: Boolean, + val originId: Long? = null, val createdAt: LocalDateTime, val updatedAt: LocalDateTime ) { @@ -23,6 +24,7 @@ data class BundleResponse( scrapeCount = bundle.scrapeCount, tags = bundle.bundleTags.map { TagResponse.from(it.tag) }, isHot = bundle.isHot(), + originId = bundle.originId, createdAt = bundle.createdAt, updatedAt = bundle.updatedAt ) diff --git a/server/api/src/main/kotlin/com/kw/api/domain/bundle/service/BundleService.kt b/server/api/src/main/kotlin/com/kw/api/domain/bundle/service/BundleService.kt index fe634b7..d9c9262 100644 --- a/server/api/src/main/kotlin/com/kw/api/domain/bundle/service/BundleService.kt +++ b/server/api/src/main/kotlin/com/kw/api/domain/bundle/service/BundleService.kt @@ -67,6 +67,7 @@ class BundleService( return BundleDetailResponse( id = bundle.id!!, shareType = bundle.shareType.name, + originId = bundle.originId ) }