toJson method

Map<String, dynamic> toJson()

Converts the Conversation instance into a JSON-compatible map.

Implementation

Map<String, dynamic> toJson() => {
  'id': id,
  'name': name,
  'type': type,
  'instanceName': instanceName,
  'is_running': isConversationning,
  'session_id': sessionId,
  'default': isDefault,
  'stats': stats,
  'conversationId': conversationId,
  'error_logs': errorLogs?.map((e) => e.toJson()).toList(),
  'created_at': createdAt.toIso8601String(),
  'updated_at': updatedAt.toIso8601String(),
};