toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = {
'uid': uid,
'referralCode': referralCode,
'isGlobalSalesPool': isGlobalSalesPool,
'isFounder': isFounder,
'isCorporate': isCorporate,
'wallet': wallet,
'founderShares': founderShares,
'parentId': parentId,
'createdAt': createdAt.toIso8601String(),
'updatedAt': updatedAt.toIso8601String(),
'paymentAddress': paymentAddress,
'paymentAddressLinked': paymentAddressLinked,
'neoMilesWallet': neoMilesWallet,
'rank': rank,
'email': email,
'firstName': firstName,
'lastName': lastName,
'phone': phone,
'countryCode': countryCode,
'country': country,
'role': role,
'isActive': isActive,
'imgUrl': imgUrl,
'lastSubscription': lastSubscription?.toJson(),
};
if (subscriptions != null) {
data['subscriptions'] = subscriptions!.map((v) => v.toJson()).toList();
}
return data;
}