version_res.dart 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. class VersionRes {
  2. VersionResBody? body;
  3. int? status;
  4. String? msg;
  5. VersionRes({this.body, this.status, this.msg});
  6. VersionRes.fromJson(Map<String, dynamic> json) {
  7. body = json['body'] != null ? new VersionResBody.fromJson(json['body']) : null;
  8. status = json['status'];
  9. msg = json['msg'];
  10. }
  11. Map<String, dynamic> toJson() {
  12. final Map<String, dynamic> data = new Map<String, dynamic>();
  13. if (this.body != null) {
  14. data['body'] = this.body!.toJson();
  15. }
  16. data['status'] = this.status;
  17. data['msg'] = this.msg;
  18. return data;
  19. }
  20. }
  21. class VersionResBody {
  22. String? id;
  23. String? createdDate;
  24. int? channelType;
  25. String? url;
  26. String? instructions;
  27. String? md5;
  28. String? targetVersion;
  29. String? lastVersion;
  30. int? isStrongUpdate;
  31. String? lastTime;
  32. int? status;
  33. VersionResBody(
  34. {this.id,
  35. this.createdDate,
  36. this.channelType,
  37. this.url,
  38. this.instructions,
  39. this.md5,
  40. this.targetVersion,
  41. this.lastVersion,
  42. this.isStrongUpdate,
  43. this.lastTime,
  44. this.status});
  45. VersionResBody.fromJson(Map<String, dynamic> json) {
  46. id = json['id'];
  47. createdDate = json['createdDate'];
  48. channelType = json['channelType'];
  49. url = json['url'];
  50. instructions = json['instructions'];
  51. md5 = json['md5'];
  52. targetVersion = json['targetVersion'];
  53. lastVersion = json['lastVersion'];
  54. isStrongUpdate = json['isStrongUpdate'];
  55. lastTime = json['lastTime'];
  56. status = json['status'];
  57. }
  58. Map<String, dynamic> toJson() {
  59. final Map<String, dynamic> data = new Map<String, dynamic>();
  60. data['id'] = this.id;
  61. data['createdDate'] = this.createdDate;
  62. data['channelType'] = this.channelType;
  63. data['url'] = this.url;
  64. data['instructions'] = this.instructions;
  65. data['md5'] = this.md5;
  66. data['targetVersion'] = this.targetVersion;
  67. data['lastVersion'] = this.lastVersion;
  68. data['isStrongUpdate'] = this.isStrongUpdate;
  69. data['lastTime'] = this.lastTime;
  70. data['status'] = this.status;
  71. return data;
  72. }
  73. }