toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'_id'] = this.id;
json[r'tenantId'] = this.tenantId;
if (this.title != null) {
json[r'title'] = this.title;
} else {
json[r'title'] = null;
}
if (this.fromUserId != null) {
json[r'fromUserId'] = this.fromUserId;
} else {
json[r'fromUserId'] = null;
}
if (this.fromUserDisplayName != null) {
json[r'fromUserDisplayName'] = this.fromUserDisplayName;
} else {
json[r'fromUserDisplayName'] = null;
}
if (this.fromUserAvatar != null) {
json[r'fromUserAvatar'] = this.fromUserAvatar;
} else {
json[r'fromUserAvatar'] = null;
}
if (this.fromIpHash != null) {
json[r'fromIpHash'] = this.fromIpHash;
} else {
json[r'fromIpHash'] = null;
}
json[r'tags'] = this.tags;
if (this.weight != null) {
json[r'weight'] = this.weight;
} else {
json[r'weight'] = null;
}
json[r'meta'] = this.meta;
if (this.contentHTML != null) {
json[r'contentHTML'] = this.contentHTML;
} else {
json[r'contentHTML'] = null;
}
json[r'media'] = this.media;
json[r'links'] = this.links;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'reacts'] = this.reacts;
if (this.commentCount != null) {
json[r'commentCount'] = this.commentCount;
} else {
json[r'commentCount'] = null;
}
return json;
}