feat(creator): 채널 홈 기본 화면을 연결한다

This commit is contained in:
Yu Sung
2026-07-01 20:14:08 +09:00
parent 033a9d3a0b
commit 29f7f3c26c
10 changed files with 638 additions and 1 deletions

View File

@@ -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?
}

View File

@@ -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 "후원"
}
}
}