couldPhoneFileListModel.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // couldPhoneFileListModel.h
  3. // 隐私保护
  4. //
  5. // Created by xd h on 2024/1/8.
  6. //
  7. #import "SuperModel.h"
  8. #import "BGFMDB.h" //添加该头文件,本类就具有了存储功能.
  9. NS_ASSUME_NONNULL_BEGIN
  10. //{
  11. // "type":"search",
  12. // "data":{
  13. // "status":0, --接口状态 1 失败 0 成功
  14. // "msg":"xxxxxxx", --接口状态描述 success 成功 failed失败
  15. // "list":[
  16. // "fileType":"xxx", --文件类型
  17. // "length":"xxx", --文件长度
  18. // "name":"xxx", --文件名
  19. // "path":"xxx" --文件路径
  20. // "time":1692844579000 --创建文件时间戳 (毫秒)
  21. // ]
  22. // }
  23. //}
  24. typedef enum{
  25. downloadStateWait = 0,
  26. downloadStateUploading,
  27. downloadStateSuspend,
  28. downloadStateFail,
  29. downloadStateDone,//
  30. }downloadStateType;
  31. @interface couldPhoneFileModel : SuperModel
  32. @property (nonatomic, copy) NSString * fileType;//jpg video audio
  33. @property (nonatomic, copy) NSString * path;
  34. @property (nonatomic, copy) NSString * name;
  35. @property (nonatomic, assign) long length;
  36. @property (nonatomic, assign) long time;
  37. //自定义
  38. @property (nonatomic, assign) BOOL isSelectType;
  39. @property (nonatomic, assign) downloadStateType curDownloadStateType;
  40. @property (nonatomic, assign) long didDownloadBytes;//已经上传的字节数
  41. @property (nonatomic, assign) long preDownloadBytes;//已经上传的字节数
  42. @property (nonatomic, assign) NSTimeInterval preTimeInterval;//计算速度用
  43. @property (nonatomic, assign) NSTimeInterval curTimeInterval;//计算速度用
  44. - (NSString*)getFileNameFun;
  45. @end
  46. @protocol couldPhoneFileModel;
  47. @interface couldPhoneFileArrModel : SuperModel
  48. @property (nonatomic, strong) NSArray<couldPhoneFileModel>* list;
  49. @end
  50. @interface couldPhoneFileListModel : SuperModel
  51. @property (nonatomic, strong) couldPhoneFileArrModel* data;
  52. @property (nonatomic, copy) NSString * type;
  53. @end
  54. NS_ASSUME_NONNULL_END