|
@@ -19,6 +19,10 @@ UserMeEntity $UserMeEntityFromJson(Map<String, dynamic> json) {
|
|
|
if (phone != null) {
|
|
|
userMeEntity.phone = phone;
|
|
|
}
|
|
|
+ final String? email = jsonConvert.convert<String>(json['email']);
|
|
|
+ if (email != null) {
|
|
|
+ userMeEntity.email = email;
|
|
|
+ }
|
|
|
final String? followsCount = jsonConvert.convert<String>(json['follows_count']);
|
|
|
if (followsCount != null) {
|
|
|
userMeEntity.followsCount = followsCount;
|
|
@@ -45,6 +49,10 @@ UserMeEntity $UserMeEntityFromJson(Map<String, dynamic> json) {
|
|
|
if (defaultUnit != null) {
|
|
|
userMeEntity.defaultUnit = defaultUnit;
|
|
|
}
|
|
|
+ final UserMeInformation? information = jsonConvert.convert<UserMeInformation>(json['information']);
|
|
|
+ if (information != null) {
|
|
|
+ userMeEntity.information = information;
|
|
|
+ }
|
|
|
return userMeEntity;
|
|
|
}
|
|
|
|
|
@@ -54,12 +62,14 @@ Map<String, dynamic> $UserMeEntityToJson(UserMeEntity entity) {
|
|
|
data['name'] = entity.name;
|
|
|
data['avatar'] = entity.avatar;
|
|
|
data['phone'] = entity.phone;
|
|
|
+ data['email'] = entity.email;
|
|
|
data['follows_count'] = entity.followsCount;
|
|
|
data['flowers_count'] = entity.flowersCount;
|
|
|
data['posts_count'] = entity.postsCount;
|
|
|
data['households'] = entity.households?.map((v) => v.toJson()).toList();
|
|
|
data['estates'] = entity.estates?.map((v) => v.toJson()).toList();
|
|
|
data['default_unit'] = entity.defaultUnit?.toJson();
|
|
|
+ data['information'] = entity.information?.toJson();
|
|
|
return data;
|
|
|
}
|
|
|
|
|
@@ -69,24 +79,28 @@ extension UserMeEntityExtension on UserMeEntity {
|
|
|
String? name,
|
|
|
String? avatar,
|
|
|
String? phone,
|
|
|
+ String? email,
|
|
|
String? followsCount,
|
|
|
String? flowersCount,
|
|
|
String? postsCount,
|
|
|
List<UserMeHouseholds>? households,
|
|
|
List<UserMeEstates>? estates,
|
|
|
UserMeDefaultUnit? defaultUnit,
|
|
|
+ UserMeInformation? information,
|
|
|
}) {
|
|
|
return UserMeEntity()
|
|
|
..id = id ?? this.id
|
|
|
..name = name ?? this.name
|
|
|
..avatar = avatar ?? this.avatar
|
|
|
..phone = phone ?? this.phone
|
|
|
+ ..email = email ?? this.email
|
|
|
..followsCount = followsCount ?? this.followsCount
|
|
|
..flowersCount = flowersCount ?? this.flowersCount
|
|
|
..postsCount = postsCount ?? this.postsCount
|
|
|
..households = households ?? this.households
|
|
|
..estates = estates ?? this.estates
|
|
|
- ..defaultUnit = defaultUnit ?? this.defaultUnit;
|
|
|
+ ..defaultUnit = defaultUnit ?? this.defaultUnit
|
|
|
+ ..information = information ?? this.information;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -349,4 +363,49 @@ extension UserMeDefaultUnitExtension on UserMeDefaultUnit {
|
|
|
..address = address ?? this.address
|
|
|
..type = type ?? this.type;
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+UserMeInformation $UserMeInformationFromJson(Map<String, dynamic> json) {
|
|
|
+ final UserMeInformation userMeInformation = UserMeInformation();
|
|
|
+ final String? firstName = jsonConvert.convert<String>(json['first_name']);
|
|
|
+ if (firstName != null) {
|
|
|
+ userMeInformation.firstName = firstName;
|
|
|
+ }
|
|
|
+ final String? lastName = jsonConvert.convert<String>(json['last_name']);
|
|
|
+ if (lastName != null) {
|
|
|
+ userMeInformation.lastName = lastName;
|
|
|
+ }
|
|
|
+ final String? countryCode = jsonConvert.convert<String>(json['country_code']);
|
|
|
+ if (countryCode != null) {
|
|
|
+ userMeInformation.countryCode = countryCode;
|
|
|
+ }
|
|
|
+ final String? phone = jsonConvert.convert<String>(json['phone']);
|
|
|
+ if (phone != null) {
|
|
|
+ userMeInformation.phone = phone;
|
|
|
+ }
|
|
|
+ return userMeInformation;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $UserMeInformationToJson(UserMeInformation entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['first_name'] = entity.firstName;
|
|
|
+ data['last_name'] = entity.lastName;
|
|
|
+ data['country_code'] = entity.countryCode;
|
|
|
+ data['phone'] = entity.phone;
|
|
|
+ return data;
|
|
|
+}
|
|
|
+
|
|
|
+extension UserMeInformationExtension on UserMeInformation {
|
|
|
+ UserMeInformation copyWith({
|
|
|
+ String? firstName,
|
|
|
+ String? lastName,
|
|
|
+ String? countryCode,
|
|
|
+ String? phone,
|
|
|
+ }) {
|
|
|
+ return UserMeInformation()
|
|
|
+ ..firstName = firstName ?? this.firstName
|
|
|
+ ..lastName = lastName ?? this.lastName
|
|
|
+ ..countryCode = countryCode ?? this.countryCode
|
|
|
+ ..phone = phone ?? this.phone;
|
|
|
+ }
|
|
|
}
|