toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'parentId': parentId,
'title': title,
'category': category,
'movie': movie?.toJson(),
'show': show?.toJson(),
'season': season?.toJson(),
'episode': episode?.toJson(),
'book': book?.toJson(),
'audiobook': audiobook?.toJson(),
};
}