forum.dart 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. class Forum {
  2. String? forumId;
  3. String? gameId;
  4. String? subjectCount;
  5. String? userCount;
  6. String? icon;
  7. String? cover;
  8. String? name;
  9. String? digest;
  10. String? gameName;
  11. bool? hasUpdated;
  12. Forum(
  13. {this.forumId,
  14. this.gameId,
  15. this.subjectCount,
  16. this.userCount,
  17. this.icon,
  18. this.cover,
  19. this.name,
  20. this.digest,
  21. this.gameName,
  22. this.hasUpdated});
  23. Forum.fromJson(Map<String, dynamic> json) {
  24. forumId = json['forumId'];
  25. gameId = json['gameId'];
  26. subjectCount = json['subjectCount'];
  27. userCount = json['userCount'];
  28. icon = json['icon'];
  29. cover = json['cover'];
  30. name = json['name'];
  31. digest = json['digest'];
  32. gameName = json['gameName'];
  33. hasUpdated = json['has_updated'];
  34. }
  35. Map<String, dynamic> toJson() {
  36. final Map<String, dynamic> data = new Map<String, dynamic>();
  37. data['forumId'] = this.forumId;
  38. data['gameId'] = this.gameId;
  39. data['subjectCount'] = this.subjectCount;
  40. data['userCount'] = this.userCount;
  41. data['icon'] = this.icon;
  42. data['cover'] = this.cover;
  43. data['name'] = this.name;
  44. data['digest'] = this.digest;
  45. data['gameName'] = this.gameName;
  46. data['has_updated'] = this.hasUpdated;
  47. return data;
  48. }
  49. }