toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'mediaId': mediaId,
'localPath': localPath,
'storagePath': storagePath,
'type': type.string,
'retryCount': retryCount,
'createdAt': createdAt.toIso8601String(),
'lastAttemptAt': lastAttemptAt?.toIso8601String(),
'taskStatus': taskStatus.name,
};