Converts the document to a map.
Map<String, dynamic> toMap() { return { 'id': id, 'pageContent': pageContent, 'metadata': metadata, }; }