toJson method

Map<String, dynamic> toJson()

Convertir a JSON para exportación

Implementation

Map<String, dynamic> toJson() {
  return {
    'event_id': eventId,
    'timestamp': timestamp.toIso8601String(),
    'event_type': eventType,
    'event_description': eventDescription,
    'event_context': eventContext,
    'rule_executions': ruleExecutions.map((rule) => rule.toJson()).toList(),
    'start_time': startTime?.toIso8601String(),
    'end_time': endTime?.toIso8601String(),
    'total_duration_ms': totalDurationMs,
    'overall_status': overallStatus.name,
  };
}