toJson method
Converts the PendingEvent to JSON for storage
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'eventType': eventType.name,
'eventData': eventData,
'integrationName': integrationName,
'attemptCount': attemptCount,
'lastAttempt': lastAttempt.millisecondsSinceEpoch,
'retryIntervalSeconds': retryIntervalSeconds,
'createdAt': createdAt.millisecondsSinceEpoch,
};
}