toJson method
Implementation
Map<String, dynamic> toJson() => {
"_id": id,
"admin": admin,
"archived": archived,
"atype": atype,
"category": category,
"execute_date": executeDate.toIso8601String(),
"extra_points": extraPoints,
"moderation": moderation,
"owner_name": ownerName,
"points": points,
"state": state,
"team": team,
"participant": participant.toJson(),
"permalink": permalink,
"short_url": shortUrl,
"facebook_tab_url": facebookTabUrl,
"votes_count": votesCount,
"votes_average": votesAverage,
"votes_up": votesUp,
"votes_down": votesDown,
"title": title,
"body": body,
"editable_by": editableBy,
"deleteable_by": deleteableBy,
"created_at": createdAt,
"format": format,
"tags": List<dynamic>.from(tags.map((x) => x)),
"participants_tags": List<dynamic>.from(participantsTags.map((x) => x)),
if (coverUrl != null) "cover_url": coverUrl,
if (videoCoverUrl != null) "video_cover_url": videoCoverUrl,
};