toJson method
JSON serialization
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'category': category.rawValue,
'format': format.rawValue,
if (downloadURL != null) 'downloadURL': downloadURL.toString(),
if (localPath != null) 'localPath': localPath.toString(),
'artifactType': artifactType.toJson(),
if (downloadSize != null) 'downloadSize': downloadSize,
'framework': framework.rawValue,
if (contextLength != null) 'contextLength': contextLength,
'supportsThinking': supportsThinking,
if (thinkingPattern != null)
'thinkingPattern': thinkingPattern!.toJson(),
if (description != null) 'description': description,
'source': source.rawValue,
'createdAt': createdAt.toIso8601String(),
'updatedAt': updatedAt.toIso8601String(),
};