toJson method

  1. @override
Map<String, dynamic> toJson()

Returns a serialized JSON structure of the model which also includes fields used by the database.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    '__className__': 'serverpod_auth_idp.FacebookAccount',
    if (id != null) 'id': id?.toJson(),
    'authUserId': authUserId.toJson(),
    if (authUser != null) 'authUser': authUser?.toJson(),
    'createdAt': createdAt.toJson(),
    'userIdentifier': userIdentifier,
    if (email != null) 'email': email,
    if (fullName != null) 'fullName': fullName,
    if (firstName != null) 'firstName': firstName,
    if (lastName != null) 'lastName': lastName,
  };
}