JXEpisodeInfo.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // JXEpisodeInfo.h
  3. // AICity
  4. //
  5. // Created by TogetherWatch on 2025-10-20.
  6. // Feature: 010-ui-ios - iOS平台完整功能实现(对标Android)
  7. // Phase: 1 - 数据模型层
  8. //
  9. // 对应Android: EpisodeInfo (CollectionDialog.kt)
  10. //
  11. #import <Foundation/Foundation.h>
  12. NS_ASSUME_NONNULL_BEGIN
  13. /**
  14. * 剧集信息模型(用于合集列表)
  15. */
  16. @interface JXEpisodeInfo : NSObject
  17. #pragma mark - 基本信息
  18. @property (nonatomic, copy) NSString *episodeId;
  19. @property (nonatomic, assign) NSInteger episodeNumber; // 集数(如第1集)
  20. @property (nonatomic, copy) NSString *title; // 剧集标题
  21. @property (nonatomic, copy) NSString *thumbnailUrl; // 缩略图URL
  22. #pragma mark - 播放信息
  23. @property (nonatomic, assign) NSInteger duration; // 时长(秒)
  24. @property (nonatomic, assign) long long likeCount; // 点赞数
  25. #pragma mark - 播放源信息(腾讯播放器)
  26. @property (nonatomic, copy) NSString *tcplayerAppId; // 腾讯云AppID
  27. @property (nonatomic, copy) NSString *tcplayerFileId; // 腾讯云FileID
  28. @property (nonatomic, copy) NSString *tcplayerSign; // 播放签名(psign)
  29. @property (nonatomic, copy) NSString *tcplayerSign265; // H.265签名
  30. @property (nonatomic, copy) NSString *tcplayerSign264; // H.264签名
  31. #pragma mark - 状态标识
  32. @property (nonatomic, assign) BOOL isPaid; // 是否付费(VIP)
  33. @property (nonatomic, assign) BOOL isActive; // 是否可播放
  34. #pragma mark - 初始化方法
  35. - (instancetype)initWithDictionary:(NSDictionary *)dict;
  36. + (instancetype)episodeInfoWithDictionary:(NSDictionary *)dict;
  37. - (NSDictionary *)toDictionary;
  38. #pragma mark - UI格式化方法
  39. /**
  40. * 格式化时长显示
  41. * 格式:"MM:SS" (如 "15:30")
  42. */
  43. - (NSString *)formattedDuration;
  44. /**
  45. * 格式化点赞数
  46. * 规则:
  47. * - >= 10000: "X.Xw"
  48. * - >= 1000: "X.Xk"
  49. * - < 1000: 原始数字
  50. */
  51. - (NSString *)formattedLikeCount;
  52. @end
  53. NS_ASSUME_NONNULL_END