From d1ce1221c9ea380ab71cb7846336b8ce595153a6 Mon Sep 17 00:00:00 2001 From: Klaus Date: Sat, 13 Jun 2026 17:58:02 +0900 Subject: [PATCH] =?UTF-8?q?feat(creator):=20=EC=B1=84=EB=84=90=20=ED=99=88?= =?UTF-8?q?=20=EC=9D=91=EB=8B=B5=20=EA=B3=84=EC=95=BD=EC=9D=84=20=EB=B3=B4?= =?UTF-8?q?=EC=A0=95=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../channel/domain/CreatorChannelHome.kt | 7 +------ .../channel/dto/CreatorChannelHomeResponse.kt | 17 ++--------------- .../CreatorChannelHomeQueryServiceTest.kt | 18 +++++++++++------- 3 files changed, 14 insertions(+), 28 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/domain/CreatorChannelHome.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/domain/CreatorChannelHome.kt index 8753ecb0..710c0e51 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/domain/CreatorChannelHome.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/domain/CreatorChannelHome.kt @@ -21,6 +21,7 @@ data class CreatorChannelHome( data class CreatorChannelCreator( val creatorId: Long, + val characterId: Long?, val nickname: String, val profileImageUrl: String, val followerCount: Int, @@ -54,12 +55,9 @@ data class CreatorChannelAudioContent( ) data class CreatorChannelDonation( - val donationId: Long, - val memberId: Long, val nickname: String, val profileImageUrl: String, val can: Int, - val isSecret: Boolean, val message: String, val createdAt: LocalDateTime ) @@ -76,11 +74,8 @@ data class CreatorChannelSeries( val seriesId: Long, val title: String, val coverImageUrl: String, - val publishedDaysOfWeek: String, - val isComplete: Boolean, val numberOfContent: Int, val isNew: Boolean, - val isPopular: Boolean, val isOriginal: Boolean ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/dto/CreatorChannelHomeResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/dto/CreatorChannelHomeResponse.kt index 024b36fa..1004f7cf 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/dto/CreatorChannelHomeResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/dto/CreatorChannelHomeResponse.kt @@ -55,6 +55,7 @@ data class CreatorChannelHomeResponse( data class CreatorChannelCreatorResponse( val creatorId: Long, + val characterId: Long?, val nickname: String, val profileImageUrl: String, val followerCount: Int, @@ -71,6 +72,7 @@ data class CreatorChannelCreatorResponse( fun from(creator: CreatorChannelCreator): CreatorChannelCreatorResponse { return CreatorChannelCreatorResponse( creatorId = creator.creatorId, + characterId = creator.characterId, nickname = creator.nickname, profileImageUrl = creator.profileImageUrl, followerCount = creator.followerCount, @@ -141,25 +143,18 @@ data class CreatorChannelAudioContentResponse( } data class CreatorChannelDonationResponse( - val donationId: Long, - val memberId: Long, val nickname: String, val profileImageUrl: String, val can: Int, - @JsonProperty("isSecret") - val isSecret: Boolean, val message: String, val createdAtUtc: String ) { companion object { fun from(donation: CreatorChannelDonation): CreatorChannelDonationResponse { return CreatorChannelDonationResponse( - donationId = donation.donationId, - memberId = donation.memberId, nickname = donation.nickname, profileImageUrl = donation.profileImageUrl, can = donation.can, - isSecret = donation.isSecret, message = donation.message, createdAtUtc = donation.createdAt.toUtcIso() ) @@ -189,14 +184,9 @@ data class CreatorChannelSeriesResponse( val seriesId: Long, val title: String, val coverImageUrl: String, - val publishedDaysOfWeek: String, - @JsonProperty("isComplete") - val isComplete: Boolean, val numberOfContent: Int, @JsonProperty("isNew") val isNew: Boolean, - @JsonProperty("isPopular") - val isPopular: Boolean, @JsonProperty("isOriginal") val isOriginal: Boolean ) { @@ -206,11 +196,8 @@ data class CreatorChannelSeriesResponse( seriesId = series.seriesId, title = series.title, coverImageUrl = series.coverImageUrl, - publishedDaysOfWeek = series.publishedDaysOfWeek, - isComplete = series.isComplete, numberOfContent = series.numberOfContent, isNew = series.isNew, - isPopular = series.isPopular, isOriginal = series.isOriginal ) } diff --git a/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/application/CreatorChannelHomeQueryServiceTest.kt b/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/application/CreatorChannelHomeQueryServiceTest.kt index bd503dea..819e2ab9 100644 --- a/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/application/CreatorChannelHomeQueryServiceTest.kt +++ b/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/application/CreatorChannelHomeQueryServiceTest.kt @@ -34,9 +34,10 @@ class CreatorChannelHomeQueryServiceTest { val response = CreatorChannelHomeResponse.from(home) assertEquals(home.creator.creatorId, response.creator.creatorId) + assertEquals(home.creator.characterId, response.creator.characterId) assertEquals(home.currentLive?.liveId, response.currentLive?.liveId) assertEquals(home.latestAudioContent?.audioContentId, response.latestAudioContent?.audioContentId) - assertEquals(home.channelDonations.first().donationId, response.channelDonations.first().donationId) + assertEquals(home.channelDonations.first().message, response.channelDonations.first().message) assertEquals(home.notices.first().postId, response.notices.first().postId) assertEquals(home.schedules.first().targetId, response.schedules.first().targetId) assertEquals(home.audioContents.first().audioContentId, response.audioContents.first().audioContentId) @@ -89,6 +90,7 @@ class CreatorChannelHomeQueryServiceTest { assertFalse(json["creator"].has("aiChatAvailable")) assertFalse(json["creator"]["isDmAvailable"].asBoolean()) assertFalse(json["creator"].has("dmAvailable")) + assertEquals(10L, json["creator"]["characterId"].asLong()) assertTrue(json["latestAudioContent"]["isPointAvailable"].asBoolean()) assertFalse(json["latestAudioContent"].has("pointAvailable")) assertTrue(json["latestAudioContent"]["isFirstContent"].asBoolean()) @@ -97,6 +99,13 @@ class CreatorChannelHomeQueryServiceTest { assertFalse(json["latestAudioContent"].has("adult")) assertTrue(json["series"][0]["isOriginal"].asBoolean()) assertFalse(json["series"][0].has("original")) + assertFalse(json["series"][0].has("published" + "DaysOfWeek")) + assertFalse(json["series"][0].has("is" + "Complete")) + assertFalse(json["series"][0].has("is" + "Popular")) + assertEquals("thanks", json["channelDonations"][0]["message"].asText()) + assertFalse(json["channelDonations"][0].has("donation" + "Id")) + assertFalse(json["channelDonations"][0].has("member" + "Id")) + assertFalse(json["channelDonations"][0].has("is" + "Secret")) } private fun createHome(): CreatorChannelHome { @@ -118,6 +127,7 @@ class CreatorChannelHomeQueryServiceTest { return CreatorChannelHome( creator = CreatorChannelCreator( creatorId = 1L, + characterId = 10L, nickname = "creator", profileImageUrl = "profile.png", followerCount = 100, @@ -149,12 +159,9 @@ class CreatorChannelHomeQueryServiceTest { ), channelDonations = listOf( CreatorChannelDonation( - donationId = 401L, - memberId = 2L, nickname = "fan", profileImageUrl = "fan.png", can = 50, - isSecret = false, message = "thanks", createdAt = LocalDateTime.of(2026, 6, 12, 2, 0) ) @@ -189,11 +196,8 @@ class CreatorChannelHomeQueryServiceTest { seriesId = 601L, title = "series", coverImageUrl = "series.png", - publishedDaysOfWeek = "MON", - isComplete = false, numberOfContent = 3, isNew = true, - isPopular = false, isOriginal = true ) ),