feat(creator): 채널 홈 기본 화면을 연결한다
This commit is contained in:
@@ -0,0 +1,140 @@
|
||||
import Foundation
|
||||
|
||||
struct CreatorChannelHomeResponse: Decodable {
|
||||
var creator: CreatorChannelCreatorResponse
|
||||
let currentLive: CreatorChannelLiveResponse?
|
||||
let latestAudioContent: CreatorChannelAudioContentResponse?
|
||||
let channelDonations: [CreatorChannelDonationResponse]
|
||||
let notices: [CreatorChannelCommunityPostResponse]
|
||||
let schedules: [CreatorChannelScheduleResponse]
|
||||
let audioContents: [CreatorChannelAudioContentResponse]
|
||||
let series: [CreatorChannelSeriesResponse]
|
||||
let communities: [CreatorChannelCommunityPostResponse]
|
||||
let fanTalk: CreatorChannelFanTalkSummaryResponse
|
||||
let introduce: String
|
||||
let activity: CreatorChannelActivityResponse
|
||||
let sns: CreatorChannelSnsResponse
|
||||
}
|
||||
|
||||
struct CreatorChannelCreatorResponse: Decodable, Identifiable {
|
||||
let creatorId: Int
|
||||
let nickname: String
|
||||
let profileImageUrl: String?
|
||||
let followerCount: Int
|
||||
let characterId: Int?
|
||||
var isFollow: Bool
|
||||
var isNotify: Bool
|
||||
let isAiChatAvailable: Bool
|
||||
let isDmAvailable: Bool
|
||||
|
||||
var id: Int { creatorId }
|
||||
}
|
||||
|
||||
struct CreatorChannelLiveResponse: Decodable, Identifiable {
|
||||
let liveId: Int
|
||||
let title: String
|
||||
let coverImageUrl: String?
|
||||
let beginDateTimeUtc: String
|
||||
let price: Int
|
||||
let isAdult: Bool
|
||||
|
||||
var id: Int { liveId }
|
||||
}
|
||||
|
||||
struct CreatorChannelAudioContentResponse: Decodable, Identifiable {
|
||||
let audioContentId: Int
|
||||
let title: String
|
||||
let duration: Int
|
||||
let imageUrl: String?
|
||||
let price: Int
|
||||
let isAdult: Bool
|
||||
let isPointAvailable: Bool
|
||||
let isFirstContent: Bool
|
||||
let seriesName: String?
|
||||
let isOriginalSeries: Bool
|
||||
|
||||
var id: Int { audioContentId }
|
||||
}
|
||||
|
||||
struct CreatorChannelDonationResponse: Decodable, Identifiable {
|
||||
let donationId: Int
|
||||
let nickname: String
|
||||
let profileImageUrl: String?
|
||||
let can: Int
|
||||
let message: String
|
||||
let createdAtUtc: String
|
||||
|
||||
var id: Int { donationId }
|
||||
}
|
||||
|
||||
struct CreatorChannelScheduleResponse: Decodable, Identifiable {
|
||||
let scheduleId: String
|
||||
let scheduledAtUtc: String
|
||||
let title: String
|
||||
let type: CreatorActivityType
|
||||
let targetId: Int
|
||||
|
||||
var id: String { scheduleId }
|
||||
}
|
||||
|
||||
struct CreatorChannelSeriesResponse: Decodable, Identifiable {
|
||||
let seriesId: Int
|
||||
let title: String
|
||||
let coverImageUrl: String?
|
||||
let numberOfContent: Int
|
||||
let isNew: Bool
|
||||
let isOriginal: Bool
|
||||
|
||||
var id: Int { seriesId }
|
||||
}
|
||||
|
||||
struct CreatorChannelCommunityPostResponse: Decodable, Identifiable {
|
||||
let postId: Int
|
||||
let creatorId: Int
|
||||
let creatorNickname: String
|
||||
let creatorProfileImageUrl: String?
|
||||
let content: String
|
||||
let imageUrl: String?
|
||||
let audioUrl: String?
|
||||
let price: Int
|
||||
let existOrdered: Bool
|
||||
let likeCount: Int
|
||||
let commentCount: Int
|
||||
let createdAtUtc: String
|
||||
|
||||
var id: Int { postId }
|
||||
}
|
||||
|
||||
struct CreatorChannelFanTalkSummaryResponse: Decodable {
|
||||
let totalCount: Int
|
||||
let latestFanTalk: CreatorChannelFanTalkResponse?
|
||||
}
|
||||
|
||||
struct CreatorChannelFanTalkResponse: Decodable, Identifiable {
|
||||
let fanTalkId: Int
|
||||
let nickname: String
|
||||
let profileImageUrl: String?
|
||||
let content: String
|
||||
let languageCode: String
|
||||
let createdAtUtc: String
|
||||
|
||||
var id: Int { fanTalkId }
|
||||
}
|
||||
|
||||
struct CreatorChannelActivityResponse: Decodable {
|
||||
let debutDateUtc: String
|
||||
let dDay: Int
|
||||
let liveCount: Int
|
||||
let liveDurationHours: Int
|
||||
let liveContributorCount: Int
|
||||
let audioContentCount: Int
|
||||
let seriesCount: Int
|
||||
}
|
||||
|
||||
struct CreatorChannelSnsResponse: Decodable {
|
||||
let instagramUrl: String?
|
||||
let youtubeUrl: String?
|
||||
let xUrl: String?
|
||||
let kakaoOpenChatUrl: String?
|
||||
let fancimmUrl: String?
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import Foundation
|
||||
|
||||
enum CreatorChannelHomeTab: CaseIterable, Hashable {
|
||||
case home
|
||||
case live
|
||||
case audio
|
||||
case series
|
||||
case community
|
||||
case fanTalk
|
||||
case donation
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
case .home:
|
||||
return "홈"
|
||||
case .live:
|
||||
return "라이브"
|
||||
case .audio:
|
||||
return "오디오"
|
||||
case .series:
|
||||
return "시리즈"
|
||||
case .community:
|
||||
return "커뮤니티"
|
||||
case .fanTalk:
|
||||
return "팬Talk"
|
||||
case .donation:
|
||||
return "후원"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user