readEntitySnapshot method
Read entity + sync metadata fields (\$synced, \$origin, \$updatedAt).
Implementation
Map<String, Object?>? readEntitySnapshot(String type, String id) {
final base = readEntity(type, id);
if (base == null) return null;
final meta = _syncMetadata[_ek(type, id)];
return {
...base,
r'$synced': meta?.synced ?? true,
r'$origin': meta?.origin.name ?? 'server',
r'$updatedAt': meta?.updatedAt?.millisecondsSinceEpoch,
};
}