feat(creator): 커뮤니티 탭을 추가한다
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user