mind_map.dart 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. class MindMap {
  2. String? id;
  3. String? name;
  4. String? folderId;
  5. String? icon; // 缩略图id 存在文件模块
  6. int? fileVersion;
  7. String? creator;
  8. String? creatorUnit;
  9. String? createTime;
  10. String? updateTime;
  11. bool? shared;
  12. bool? cooperative;
  13. String? content;
  14. bool? editable;
  15. List<String>? sharePersonList;
  16. List<String>? shareUnitList;
  17. List<String>? shareGroupList;
  18. List<String>? editorList;
  19. MindMap.fromJson(Map<String, dynamic> json) {
  20. id = json['id'];
  21. name = json['name'];
  22. folderId = json['folderId'];
  23. icon = json['icon'];
  24. fileVersion = json['fileVersion'];
  25. creator = json['creator'];
  26. creatorUnit = json['creatorUnit'];
  27. createTime = json['createTime'];
  28. updateTime = json['updateTime'];
  29. shared = json['shared'];
  30. cooperative = json['cooperative'];
  31. content = json['content'];
  32. editable = json['editable'];
  33. var sharePlist = json['sharePersonList'] == null ? [] : json['sharePersonList'] as List;
  34. sharePersonList = sharePlist.map((share) => share as String).toList();
  35. var shareUList = json['shareUnitList'] == null ? [] : json['shareUnitList'] as List;
  36. shareUnitList = shareUList.map((share) => share as String).toList();
  37. var shareGList = json['shareGroupList'] == null ? [] : json['shareGroupList'] as List;
  38. shareGroupList = shareGList.map((share) => share as String).toList();
  39. var shareEList = json['editorList'] == null ? [] : json['editorList'] as List;
  40. editorList = shareEList.map((share) => share as String).toList();
  41. }
  42. Map<String, dynamic> toJson() {
  43. Map<String, dynamic> map = {};
  44. map['id'] = id;
  45. map['name'] = name;
  46. map['folderId'] = folderId;
  47. map['icon'] = icon;
  48. map['fileVersion'] = fileVersion;
  49. map['creator'] = creator;
  50. map['creatorUnit'] = creatorUnit;
  51. map['createTime'] = createTime;
  52. map['updateTime'] = updateTime;
  53. map['shared'] = shared;
  54. map['cooperative'] = cooperative;
  55. map['content'] = content;
  56. map['editable'] = editable;
  57. map['sharePersonList'] = sharePersonList;
  58. map['shareUnitList'] = shareUnitList;
  59. map['shareGroupList'] = shareGroupList;
  60. map['editorList'] = editorList;
  61. return map;
  62. }
  63. }