Converts the entry to a JSON-compatible map, including the document ID.
Map<String, dynamic> toJson() => { 'id': id, ...toMap(), };