diff --git a/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/data/HomeRecommendationModels.kt b/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/data/HomeRecommendationModels.kt index 6f2eaa87..a6c95bc2 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/data/HomeRecommendationModels.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/data/HomeRecommendationModels.kt @@ -2,6 +2,7 @@ package kr.co.vividnext.sodalive.v2.main.home.data import androidx.annotation.Keep import com.google.gson.annotations.SerializedName +import kr.co.vividnext.sodalive.settings.event.EventItem @Keep data class HomeRecommendationResponse( @@ -18,38 +19,34 @@ data class HomeRecommendationResponse( @Keep data class HomeLiveItem( - @SerializedName("liveId") val liveId: Long, - @SerializedName("creatorId") val creatorId: Long, - @SerializedName("imageUrl") val imageUrl: String?, - @SerializedName("title") val title: String, + @SerializedName("roomId") val roomId: Long, @SerializedName("creatorNickname") val creatorNickname: String, - @SerializedName("beginDateTime") val beginDateTime: String? + @SerializedName("creatorProfileImage") val creatorProfileImage: String ) @Keep data class HomeBannerItem( - @SerializedName("bannerId") val bannerId: String?, - @SerializedName("imageUrl") val imageUrl: String?, - @SerializedName("type") val type: String?, - @SerializedName("linkUrl") val linkUrl: String?, - @SerializedName("targetId") val targetId: Long? + @SerializedName("imageUrl") val imageUrl: String, + @SerializedName("eventItem") val eventItem: EventItem?, + @SerializedName("creatorId") val creatorId: Long?, + @SerializedName("seriesId") val seriesId: Long?, + @SerializedName("link") val link: String? ) @Keep data class HomeActiveCreatorItem( - @SerializedName("creatorId") val creatorId: Long, - @SerializedName("nickname") val nickname: String, - @SerializedName("profileImage") val profileImage: String?, - @SerializedName("title") val title: String?, + @SerializedName("creatorNickname") val creatorNickname: String, + @SerializedName("creatorProfileImage") val creatorProfileImage: String, @SerializedName("activityType") val activityType: String, - @SerializedName("activityAt") val activityAt: String? + @SerializedName("activityAt") val activityAt: String, + @SerializedName("targetId") val targetId: Long? ) @Keep data class HomeCreatorItem( @SerializedName("creatorId") val creatorId: Long, - @SerializedName("nickname") val nickname: String, - @SerializedName("profileImage") val profileImage: String? + @SerializedName("creatorNickname") val creatorNickname: String, + @SerializedName("creatorProfileImage") val creatorProfileImage: String ) @Keep @@ -57,11 +54,10 @@ data class HomeFirstAudioContentItem( @SerializedName("contentId") val contentId: Long, @SerializedName("creatorId") val creatorId: Long, @SerializedName("creatorNickname") val creatorNickname: String, - @SerializedName("creatorProfileImage") val creatorProfileImage: String?, + @SerializedName("creatorProfileImage") val creatorProfileImage: String, @SerializedName("title") val title: String, @SerializedName("price") val price: Int, @SerializedName("coverImage") val coverImage: String?, - @SerializedName("releaseDate") val releaseDate: String, @SerializedName("isPointAvailable") val isPointAvailable: Boolean ) @@ -77,7 +73,7 @@ data class HomeAiCharacterItem( @Keep data class HomeGenreCreatorGroupItem( - @SerializedName("genre") val genre: String, + @SerializedName("genreName") val genreName: String, @SerializedName("creators") val creators: List ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/model/HomeRecommendationMappers.kt b/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/model/HomeRecommendationMappers.kt index 75cc0e9b..eb762c20 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/model/HomeRecommendationMappers.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/model/HomeRecommendationMappers.kt @@ -30,39 +30,35 @@ fun HomeRecommendationResponse.toContent(): HomeRecommendationUiState.Content = ) fun HomeLiveItem.toUiModel(): HomeRecommendationLiveUiModel = HomeRecommendationLiveUiModel( - liveId = liveId, - creatorId = creatorId, - imageUrl = imageUrl, - title = title, + roomId = roomId, creatorNickname = creatorNickname, - beginDateTime = beginDateTime + creatorProfileImage = creatorProfileImage ) fun HomeBannerItem.toUiModel(): HomeRecommendationBannerUiModel = HomeRecommendationBannerUiModel( - bannerId = bannerId, imageUrl = imageUrl, - type = type, - linkUrl = linkUrl, - targetId = targetId + eventItem = eventItem, + creatorId = creatorId, + seriesId = seriesId, + link = link ) fun HomeActiveCreatorItem.toUiModel(): HomeRecommendationRecentlyActiveCreatorUiModel { val recommendedActivityType = RecommendedActivityType.from(activityType) return HomeRecommendationRecentlyActiveCreatorUiModel( - creatorId = creatorId, - nickname = nickname, - profileImage = profileImage, - title = title, + nickname = creatorNickname, + profileImage = creatorProfileImage, activityType = recommendedActivityType, activityLabelResId = recommendedActivityType?.labelResId, - activityAt = activityAt + activityAt = activityAt, + targetId = targetId ) } fun HomeCreatorItem.toUiModel(): HomeRecommendationCreatorUiModel = HomeRecommendationCreatorUiModel( creatorId = creatorId, - nickname = nickname, - profileImage = profileImage + nickname = creatorNickname, + profileImage = creatorProfileImage ) fun HomeFirstAudioContentItem.toUiModel(): HomeRecommendationFirstAudioContentUiModel = @@ -74,7 +70,6 @@ fun HomeFirstAudioContentItem.toUiModel(): HomeRecommendationFirstAudioContentUi title = title, price = price, coverImage = coverImage, - releaseDate = releaseDate, tags = buildSet { add(AudioContentTag.First) if (isPointAvailable) add(AudioContentTag.Point) @@ -96,7 +91,7 @@ fun HomeAiCharacterItem.toUiModel(): HomeRecommendationAiCharacterUiModel = Home fun HomeGenreCreatorGroupItem.toUiModel(): HomeRecommendationGenreCreatorGroupUiModel = HomeRecommendationGenreCreatorGroupUiModel( - genre = genre, + genre = genreName, creators = creators.map { it.toUiModel() } ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/model/HomeRecommendationUiModels.kt b/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/model/HomeRecommendationUiModels.kt index ed1625b5..f311ff7f 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/model/HomeRecommendationUiModels.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/v2/main/home/model/HomeRecommendationUiModels.kt @@ -1,5 +1,6 @@ package kr.co.vividnext.sodalive.v2.main.home.model +import kr.co.vividnext.sodalive.settings.event.EventItem import kr.co.vividnext.sodalive.v2.widget.AudioContentTag import kr.co.vividnext.sodalive.v2.widget.characterchatthumbnail.CharacterChatThumbnailItem import kr.co.vividnext.sodalive.v2.widget.feed.FeedItem @@ -51,47 +52,42 @@ fun HomeRecommendationPopularCommunityPostSection.visibleHomePopularCommunityPos } data class HomeRecommendationLiveUiModel( - val liveId: Long, - val creatorId: Long, - val imageUrl: String?, - val title: String, + val roomId: Long, val creatorNickname: String, - val beginDateTime: String? + val creatorProfileImage: String ) data class HomeRecommendationBannerUiModel( - val bannerId: String?, - val imageUrl: String?, - val type: String?, - val linkUrl: String?, - val targetId: Long? + val imageUrl: String, + val eventItem: EventItem?, + val creatorId: Long?, + val seriesId: Long?, + val link: String? ) data class HomeRecommendationRecentlyActiveCreatorUiModel( - val creatorId: Long, val nickname: String, - val profileImage: String?, - val title: String?, + val profileImage: String, val activityType: RecommendedActivityType?, val activityLabelResId: Int?, - val activityAt: String? + val activityAt: String, + val targetId: Long? ) data class HomeRecommendationCreatorUiModel( val creatorId: Long, val nickname: String, - val profileImage: String? + val profileImage: String ) data class HomeRecommendationFirstAudioContentUiModel( val contentId: Long, val creatorId: Long, val creatorNickname: String, - val creatorProfileImage: String?, + val creatorProfileImage: String, val title: String, val price: Int, val coverImage: String?, - val releaseDate: String, val tags: Set )