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

@JsonSerializable()
class UserMeEntity {
	String? id;
	String? name;
	String? avatar;
	String? phone;
	String? email;
	@JSONField(name: "follows_count")
	String? followsCount;
	@JSONField(name: "flowers_count")
	String? flowersCount;
	@JSONField(name: "posts_count")
	String? postsCount;
	@JSONField(name: "reward_points")
	String? rewardPoints;
	@JSONField(name: "unread_notifications_count")
	String? unreadNotificationsCount;
	List<UserMeHouseholds>? households = [];
	List<UserMeEstates>? estates = [];
	@JSONField(name: "default_unit")
	UserMeDefaultUnit? defaultUnit;
	UserMeInformation? information;

	UserMeEntity();

	factory UserMeEntity.fromJson(Map<String, dynamic> json) => $UserMeEntityFromJson(json);

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

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

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

	UserMeHouseholds();

	factory UserMeHouseholds.fromJson(Map<String, dynamic> json) => $UserMeHouseholdsFromJson(json);

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

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

@JsonSerializable()
class UserMeEstates {
	String? id;
	String? name;
	List<UserMeEstatesAccounts>? accounts = [];

	UserMeEstates();

	factory UserMeEstates.fromJson(Map<String, dynamic> json) => $UserMeEstatesFromJson(json);

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

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

@JsonSerializable()
class UserMeEstatesAccounts {
	String? id;
	String? name;
	String? avatar;
	String? type;
	@JSONField(name: "default")
	int isDefault = 0;
	String? status;
	UserMeEstatesAccountsUnit? unit;

	UserMeEstatesAccounts();

	factory UserMeEstatesAccounts.fromJson(Map<String, dynamic> json) => $UserMeEstatesAccountsFromJson(json);

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

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

@JsonSerializable()
class UserMeEstatesAccountsUnit {
	String? id;
	String? block;
	String? street;
	String? unit;
	String? address;

	UserMeEstatesAccountsUnit();

	factory UserMeEstatesAccountsUnit.fromJson(Map<String, dynamic> json) => $UserMeEstatesAccountsUnitFromJson(json);

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

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

@JsonSerializable()
class UserMeDefaultUnit {
	String? id;
	@JSONField(name: "estate_id")
	String? estateId;
	String? block;
	String? street;
	String? unit;
	String? address;
	int type = 0;

	UserMeDefaultUnit();

	factory UserMeDefaultUnit.fromJson(Map<String, dynamic> json) => $UserMeDefaultUnitFromJson(json);

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

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

@JsonSerializable()
class UserMeInformation {
	@JSONField(name: "first_name")
	String? firstName;
	@JSONField(name: "last_name")
	String? lastName;
	@JSONField(name: "country_code")
	String? countryCode;
	String? phone;

	UserMeInformation();

	factory UserMeInformation.fromJson(Map<String, dynamic> json) => $UserMeInformationFromJson(json);

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

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