| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- //
- // JXEpisodeInfo.h
- // AICity
- //
- // Created by TogetherWatch on 2025-10-20.
- // Feature: 010-ui-ios - iOS平台完整功能实现(对标Android)
- // Phase: 1 - 数据模型层
- //
- // 对应Android: EpisodeInfo (CollectionDialog.kt)
- //
- #import <Foundation/Foundation.h>
- NS_ASSUME_NONNULL_BEGIN
- /**
- * 剧集信息模型(用于合集列表)
- */
- @interface JXEpisodeInfo : NSObject
- #pragma mark - 基本信息
- @property (nonatomic, copy) NSString *episodeId;
- @property (nonatomic, assign) NSInteger episodeNumber; // 集数(如第1集)
- @property (nonatomic, copy) NSString *title; // 剧集标题
- @property (nonatomic, copy) NSString *thumbnailUrl; // 缩略图URL
- #pragma mark - 播放信息
- @property (nonatomic, assign) NSInteger duration; // 时长(秒)
- @property (nonatomic, assign) long long likeCount; // 点赞数
- #pragma mark - 播放源信息(腾讯播放器)
- @property (nonatomic, copy) NSString *tcplayerAppId; // 腾讯云AppID
- @property (nonatomic, copy) NSString *tcplayerFileId; // 腾讯云FileID
- @property (nonatomic, copy) NSString *tcplayerSign; // 播放签名(psign)
- @property (nonatomic, copy) NSString *tcplayerSign265; // H.265签名
- @property (nonatomic, copy) NSString *tcplayerSign264; // H.264签名
- #pragma mark - 状态标识
- @property (nonatomic, assign) BOOL isPaid; // 是否付费(VIP)
- @property (nonatomic, assign) BOOL isActive; // 是否可播放
- #pragma mark - 初始化方法
- - (instancetype)initWithDictionary:(NSDictionary *)dict;
- + (instancetype)episodeInfoWithDictionary:(NSDictionary *)dict;
- - (NSDictionary *)toDictionary;
- #pragma mark - UI格式化方法
- /**
- * 格式化时长显示
- * 格式:"MM:SS" (如 "15:30")
- */
- - (NSString *)formattedDuration;
- /**
- * 格式化点赞数
- * 规则:
- * - >= 10000: "X.Xw"
- * - >= 1000: "X.Xk"
- * - < 1000: 原始数字
- */
- - (NSString *)formattedLikeCount;
- @end
- NS_ASSUME_NONNULL_END
|