import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/newsfeed_detail_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/newsfeed_detail_entity.g.dart'; @JsonSerializable() class NewsfeedDetailEntity { int? id; String? content; List? resources; int? clicks; int? share; @JSONField(name: "created_at") String? createdAt; @JSONField(name: "likes_count") int? likesCount; @JSONField(name: "comments_count") int? commentsCount; bool? liked; NewsfeedDetailAccount? account; List? comments; NewsfeedDetailEntity(); factory NewsfeedDetailEntity.fromJson(Map json) => $NewsfeedDetailEntityFromJson(json); Map toJson() => $NewsfeedDetailEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class NewsfeedDetailAccount { int? id; String? name; String? avatar; bool? followed; NewsfeedDetailAccount(); factory NewsfeedDetailAccount.fromJson(Map json) => $NewsfeedDetailAccountFromJson(json); Map toJson() => $NewsfeedDetailAccountToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class NewsfeedDetailComments { int? id; String? content; @JSONField(name: "created_at") String? createdAt; NewsfeedDetailCommentsAccount? account; @JSONField(name: "to_account") NewsfeedDetailCommentsToAccount? toAccount; NewsfeedDetailComments(); factory NewsfeedDetailComments.fromJson(Map json) => $NewsfeedDetailCommentsFromJson(json); Map toJson() => $NewsfeedDetailCommentsToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class NewsfeedDetailCommentsAccount { int? id; String? name; String? avatar; NewsfeedDetailCommentsAccount(); factory NewsfeedDetailCommentsAccount.fromJson(Map json) => $NewsfeedDetailCommentsAccountFromJson(json); Map toJson() => $NewsfeedDetailCommentsAccountToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class NewsfeedDetailCommentsToAccount { int? id; String? name; String? avatar; NewsfeedDetailCommentsToAccount(); factory NewsfeedDetailCommentsToAccount.fromJson(Map json) => $NewsfeedDetailCommentsToAccountFromJson(json); Map toJson() => $NewsfeedDetailCommentsToAccountToJson(this); @override String toString() { return jsonEncode(this); } }