feat(feed): 피드 아이템 계약을 추가한다

This commit is contained in:
2026-05-21 15:53:39 +09:00
parent 01765f3e7f
commit a2f3910e27
4 changed files with 174 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package kr.co.vividnext.sodalive.v2.widget.feed
import androidx.annotation.StringRes
import kr.co.vividnext.sodalive.R
enum class FeedContentCategory(
@StringRes val labelResId: Int,
val ratioWidth: Int,
val ratioHeight: Int
) {
Content(labelResId = R.string.feed_content_category_content, ratioWidth = 1, ratioHeight = 1),
Series(labelResId = R.string.feed_content_category_series, ratioWidth = 163, ratioHeight = 230),
Magazine(labelResId = R.string.feed_content_category_magazine, ratioWidth = 163, ratioHeight = 218)
}

View File

@@ -0,0 +1,47 @@
package kr.co.vividnext.sodalive.v2.widget.feed
sealed class FeedItem(open val feedId: String, val variant: FeedVariant) {
data class Rank(
override val feedId: String,
val imageUrl: String,
val rankText: String,
val message: String,
val highlightRanges: List<FeedRankHighlight>
) : FeedItem(feedId, FeedVariant.Rank)
data class Live(
override val feedId: String,
val creatorId: String,
val creatorName: String,
val creatorImageUrl: String,
val liveId: String,
val liveTitle: String,
val createdAtText: String,
val endedMessage: String
) : FeedItem(feedId, FeedVariant.Live)
data class Content(
override val feedId: String,
val creatorId: String,
val creatorName: String,
val creatorImageUrl: String,
val contentId: String,
val contentTitle: String,
val contentImageUrl: String,
val createdAtText: String,
val category: FeedContentCategory = FeedContentCategory.Content
) : FeedItem(feedId, FeedVariant.Content)
data class Community(
override val feedId: String,
val creatorId: String,
val creatorName: String,
val creatorImageUrl: String,
val postId: String,
val bodyText: String,
val keywordText: String,
val createdAtText: String,
val commentCount: Int,
val likeCount: Int
) : FeedItem(feedId, FeedVariant.Community)
}

View File

@@ -0,0 +1,8 @@
package kr.co.vividnext.sodalive.v2.widget.feed
enum class FeedVariant {
Rank,
Live,
Content,
Community
}