import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/newsfeed_news_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/newsfeed_news_entity.g.dart'; @JsonSerializable() class NewsfeedNewsEntity { int? count; int? page; int? limit; @JSONField(name: "count_page") int? countPage; List? list; NewsfeedNewsEntity(); factory NewsfeedNewsEntity.fromJson(Map json) => $NewsfeedNewsEntityFromJson(json); Map toJson() => $NewsfeedNewsEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class NewsfeedNewsList { int? id; String? content; List? resources; @JSONField(name: "likes_count") int? likesCount; @JSONField(name: "comments_count") int? commentsCount; bool? liked; @JSONField(name: "created_at") String? createdAt; NewsfeedNewsListAccount? account; NewsfeedNewsList(); factory NewsfeedNewsList.fromJson(Map json) => $NewsfeedNewsListFromJson(json); Map toJson() => $NewsfeedNewsListToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class NewsfeedNewsListAccount { int? id; String? name; String? avatar; bool? followed; NewsfeedNewsListAccount(); factory NewsfeedNewsListAccount.fromJson(Map json) => $NewsfeedNewsListAccountFromJson(json); Map toJson() => $NewsfeedNewsListAccountToJson(this); @override String toString() { return jsonEncode(this); } }