import 'package:meta/meta.dart';

/// One entry from the top-level `drifts` list (reconcile.sh classes A/B/C/D),
/// not tied to a specific registered session row.
@immutable
class DriftEntry {
  final String driftClass;
  final String name;
  final String msg;

  const DriftEntry(
      {required this.driftClass, required this.name, required this.msg});

  factory DriftEntry.fromJson(Map<String, dynamic> json) {
    return DriftEntry(
      driftClass: json['class'] as String? ?? '?',
      name: json['name'] as String? ?? '?',
      msg: json['msg'] as String? ?? '',
    );
  }
}
