import 'package:domain/generated/json/base/json_field.dart';
import 'package:domain/generated/json/newsfeed_foryou_entity.g.dart';
import 'dart:convert';
export 'package:domain/generated/json/newsfeed_foryou_entity.g.dart';

@JsonSerializable()
class NewsfeedForyouEntity {
	int? count;
	int? page;
	int? limit;
	@JSONField(name: "count_page")
	int? countPage;
	List<NewsfeedForyouList>? list;

	NewsfeedForyouEntity();

	factory NewsfeedForyouEntity.fromJson(Map<String, dynamic> json) => $NewsfeedForyouEntityFromJson(json);

	Map<String, dynamic> toJson() => $NewsfeedForyouEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class NewsfeedForyouList {
	int? id;
	String? content;
	List<String>? resources;
	@JSONField(name: "likes_count")
	int? likesCount;
	@JSONField(name: "comments_count")
	int? commentsCount;
	bool? liked;
	@JSONField(name: "created_at")
	String? createdAt;
	NewsfeedForyouListAccount? account;

	NewsfeedForyouList();

	factory NewsfeedForyouList.fromJson(Map<String, dynamic> json) => $NewsfeedForyouListFromJson(json);

	Map<String, dynamic> toJson() => $NewsfeedForyouListToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class NewsfeedForyouListAccount {
	int? id;
	String? name;
	String? avatar;
	bool? followed;

	NewsfeedForyouListAccount();

	factory NewsfeedForyouListAccount.fromJson(Map<String, dynamic> json) => $NewsfeedForyouListAccountFromJson(json);

	Map<String, dynamic> toJson() => $NewsfeedForyouListAccountToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}