newsfeed_following_entity.dart 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/newsfeed_following_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/newsfeed_following_entity.g.dart';
  5. @JsonSerializable()
  6. class NewsfeedFollowingEntity {
  7. int? count;
  8. int? page;
  9. int? limit;
  10. @JSONField(name: "count_page")
  11. int? countPage;
  12. List<NewsfeedFollowingList>? list;
  13. NewsfeedFollowingEntity();
  14. factory NewsfeedFollowingEntity.fromJson(Map<String, dynamic> json) => $NewsfeedFollowingEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $NewsfeedFollowingEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }
  21. @JsonSerializable()
  22. class NewsfeedFollowingList {
  23. int? id;
  24. String? content;
  25. List<String>? resources;
  26. @JSONField(name: "likes_count")
  27. int? likesCount;
  28. @JSONField(name: "comments_count")
  29. int? commentsCount;
  30. bool? liked;
  31. @JSONField(name: "created_at")
  32. String? createdAt;
  33. NewsfeedFollowingListAccount? account;
  34. NewsfeedFollowingList();
  35. factory NewsfeedFollowingList.fromJson(Map<String, dynamic> json) => $NewsfeedFollowingListFromJson(json);
  36. Map<String, dynamic> toJson() => $NewsfeedFollowingListToJson(this);
  37. @override
  38. String toString() {
  39. return jsonEncode(this);
  40. }
  41. }
  42. @JsonSerializable()
  43. class NewsfeedFollowingListAccount {
  44. int? id;
  45. String? name;
  46. String? avatar;
  47. bool? followed;
  48. NewsfeedFollowingListAccount();
  49. factory NewsfeedFollowingListAccount.fromJson(Map<String, dynamic> json) => $NewsfeedFollowingListAccountFromJson(json);
  50. Map<String, dynamic> toJson() => $NewsfeedFollowingListAccountToJson(this);
  51. @override
  52. String toString() {
  53. return jsonEncode(this);
  54. }
  55. }