feat(creator): 커뮤니티 탭을 추가한다

This commit is contained in:
Yu Sung
2026-07-05 22:25:07 +09:00
parent 130b8eee40
commit f3b7d01a3f
20 changed files with 1706 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
import Foundation
struct CreatorChannelCommunityTabResponse: Decodable {
let communityPostCount: Int
let communityPosts: [CreatorChannelCommunityPostResponse]
let page: Int
let size: Int
let hasNext: Bool
struct CreatorChannelCommunityPostResponse: Decodable, Identifiable {
let postId: Int
let creatorId: Int
let creatorNickname: String
let creatorProfileUrl: String
let createdAtUtc: String
let content: String
let imageUrl: String?
let audioUrl: String?
let price: Int
let isCommentAvailable: Bool
let likeCount: Int
let commentCount: Int
let isPinned: Bool
let existOrdered: Bool
let isLiked: Bool?
var id: Int { postId }
func relativeTimeText(now: Date = Date()) -> String {
DateParser.relativeTimeText(fromUTC: createdAtUtc, fallback: createdAtUtc, now: now)
}
}
}
typealias CreatorChannelCommunityPostItem = CreatorChannelCommunityTabResponse.CreatorChannelCommunityPostResponse