// game_session.dart

class GameSession {
  final int sessionNumber;
  final String sessionId;
  final DateTime sessionDate;
  final Duration sessionDuration;
  final int hits;
  final int misses;

  GameSession({
    required this.sessionNumber,
    required this.sessionId,
    required this.sessionDate,
    required this.sessionDuration,
    required this.hits,
    required this.misses,
  });

  Map<String, dynamic> toJson() {
    return {
      'sessionNumber': sessionNumber,
      'sessionId': sessionId,
      'sessionDate': sessionDate.toIso8601String(),
      'sessionDuration': sessionDuration.inMilliseconds,
      'hits': hits,
      'misses': misses,
    };
  }
}
