123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- 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;
- 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);
- }
- }
|