JXPlaybackProgress.m 784 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // JXPlaybackProgress.m
  3. // AICity
  4. //
  5. // Feature: 003-ios-api-https
  6. // 播放进度数据模型实现
  7. //
  8. #import "JXPlaybackProgress.h"
  9. @implementation JXPlaybackProgress
  10. - (instancetype)init {
  11. self = [super init];
  12. if (self) {
  13. _updatedAt = [NSDate date];
  14. _synced = NO;
  15. _isCompleted = NO;
  16. _progress = 0.0;
  17. }
  18. return self;
  19. }
  20. - (NSString *)description {
  21. return [NSString stringWithFormat:@"<JXPlaybackProgress dramaId:%@ episodeId:%@ position:%ld duration:%ld progress:%.2f%% completed:%d synced:%d>",
  22. self.jxDramaId,
  23. self.jxEpisodeId,
  24. (long)self.position,
  25. (long)self.duration,
  26. self.progress * 100,
  27. self.isCompleted,
  28. self.synced];
  29. }
  30. @end