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<String>? 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<NewsfeedDetailComments>? comments;

	NewsfeedDetailEntity();

	factory NewsfeedDetailEntity.fromJson(Map<String, dynamic> json) => $NewsfeedDetailEntityFromJson(json);

	Map<String, dynamic> 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<String, dynamic> json) => $NewsfeedDetailAccountFromJson(json);

	Map<String, dynamic> 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<String, dynamic> json) => $NewsfeedDetailCommentsFromJson(json);

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

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

@JsonSerializable()
class NewsfeedDetailCommentsAccount {
	int? id;
	String? name;
	String? avatar;

	NewsfeedDetailCommentsAccount();

	factory NewsfeedDetailCommentsAccount.fromJson(Map<String, dynamic> json) => $NewsfeedDetailCommentsAccountFromJson(json);

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

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

@JsonSerializable()
class NewsfeedDetailCommentsToAccount {
	int? id;
	String? name;
	String? avatar;

	NewsfeedDetailCommentsToAccount();

	factory NewsfeedDetailCommentsToAccount.fromJson(Map<String, dynamic> json) => $NewsfeedDetailCommentsToAccountFromJson(json);

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

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