couldPhoneFileListModel.m 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //
  2. // couldPhoneFileListModel.m
  3. // 隐私保护
  4. //
  5. // Created by xd h on 2024/1/8.
  6. //
  7. #import "couldPhoneFileListModel.h"
  8. @implementation couldPhoneFileModel
  9. - (NSString*)getFileNameFun
  10. {
  11. return [[NSString alloc] initWithFormat:@"%ld_%@",self.length,self.name];
  12. }
  13. - (NSString*)fileUrl
  14. {
  15. if(!_fileUrl || _fileUrl.length ==0)
  16. {
  17. NSString *urlStr = ksharedAppDelegate.NASFileByBoxService;
  18. _fileUrl = [[NSString alloc] initWithFormat:@"%@getFile?path=%@",urlStr,self.path];
  19. }
  20. return _fileUrl;
  21. }
  22. #pragma mark - get download info
  23. // 构造回调信息
  24. - (NSDictionary *)downLoadInfoWithFinished:(BOOL)finished {
  25. return @{
  26. @"fileType" : self.fileType,
  27. @"path" : self.path,
  28. //@"path" : self.path,
  29. @"name" : self.name,
  30. @"length" : @(self.length),
  31. @"time" : @(self.time),
  32. @"curDownloadStateType" : @(self.curDownloadStateType),
  33. @"didDownloadBytes" : @(self.didDownloadBytes),
  34. @"isFinished" : @(finished)
  35. };
  36. }
  37. /**
  38. 设置不需要存储的属性, 在模型.m文件中实现该函数.
  39. */
  40. +(NSArray *)bg_ignoreKeys{
  41. return @[@"preTimeInterval",@"curTimeInterval",@"isSelectType"];
  42. }
  43. @end
  44. @implementation couldPhoneFileArrModel
  45. /**
  46. 设置不需要存储的属性, 在模型.m文件中实现该函数.
  47. */
  48. +(NSArray *)bg_ignoreKeys{
  49. return @[@"list"];
  50. }
  51. @end
  52. @implementation couldPhoneFileListModel
  53. @end