couldPhoneFileListModel.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. @property (nonatomic, copy) NSString * fileUrl;
  45. @property (nonatomic, copy) NSString * failMsg;
  46. @property (nonatomic, copy) NSString * changeFileName;
  47. - (NSString*)getFileNameFun;
  48. - (NSDictionary *)downLoadInfoWithFinished:(BOOL)finished;
  49. @end
  50. @protocol couldPhoneFileModel;
  51. @interface couldPhoneFileArrModel : SuperModel
  52. @property (nonatomic, strong) NSArray<couldPhoneFileModel>* list;
  53. @end
  54. @interface couldPhoneFileListModel : SuperModel
  55. @property (nonatomic, strong) couldPhoneFileArrModel* data;
  56. @property (nonatomic, copy) NSString * type;
  57. @end
  58. NS_ASSUME_NONNULL_END