JXInteraction.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // JXInteraction.h
  3. // AICity
  4. //
  5. // Created by TogetherWatch on 2025-10-13.
  6. // Feature: 003-ios-api-https - 剧星短剧平台API接入
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. * 剧星交互数据模型 (UI统计数据)
  12. */
  13. @interface JXInteraction : NSObject
  14. @property (nonatomic, copy) NSString *jxDramaId;
  15. @property (nonatomic, copy, nullable) NSString *jxEpisodeId;
  16. @property (nonatomic, assign) long long likeCount; // UI: "2.0万"
  17. @property (nonatomic, assign) long long commentCount; // UI: "1546"
  18. @property (nonatomic, assign) long long shareCount; // UI: "2037"
  19. @property (nonatomic, assign) long long favoriteCount; // UI: "1378"
  20. @property (nonatomic, assign) long long followCount;
  21. @property (nonatomic, assign) long long viewCount;
  22. @property (nonatomic, assign) BOOL isLiked; // 是否已点赞
  23. @property (nonatomic, assign) BOOL isFavorited; // 是否已收藏
  24. @property (nonatomic, assign) BOOL isFollowed; // 是否已关注
  25. @property (nonatomic, strong) NSDate *lastUpdated;
  26. // 初始化方法
  27. - (instancetype)initWithDictionary:(NSDictionary *)dict;
  28. - (NSDictionary *)toDictionary;
  29. // UI格式化方法
  30. - (NSString *)formattedLikeCount;
  31. - (NSString *)formattedCommentCount;
  32. - (NSString *)formattedShareCount;
  33. - (NSString *)formattedFavoriteCount;
  34. - (NSString *)formatCount:(long long)count;
  35. @end
  36. NS_ASSUME_NONNULL_END