toJSON method
Implementation
Map<String, dynamic> toJSON() => {
//'id': id, //generated by firebase
'ownerId': ownerId,
'profileName': profileName,
'profileImgUrl': profileImgUrl,
'caption': caption,
'type': type.name,
'mediaUrl': mediaUrl,
'thumbnailUrl': thumbnailUrl,
'createdTime': createdTime,
'modifiedTime': modifiedTime,
'position': jsonEncode(position),
'location': location,
'likedProfiles': likedProfiles,
'sharedProfiles': sharedProfiles,
'mentionedProfiles': mentionedProfiles,
'commentIds': commentIds,
'hashtags': hashtags,
'isCommentEnabled': isCommentEnabled,
'isPrivate': isPrivate,
'isDraft': isDraft,
'isHidden': isHidden,
'verificationLevel': verificationLevel?.name,
'mediaOwner': mediaOwner,
'referenceId': referenceId,
'lastInteraction': lastInteraction,
'aspectRatio': aspectRatio,
};