toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final _json = <String, dynamic>{};
  if (id != null) {
    _json[r'id'] = id;
  }
  if (createAt != null) {
    _json[r'create_at'] = createAt;
  }
  if (updateAt != null) {
    _json[r'update_at'] = updateAt;
  }
  if (deleteAt != null) {
    _json[r'delete_at'] = deleteAt;
  }
  if (editAt != null) {
    _json[r'edit_at'] = editAt;
  }
  if (userId != null) {
    _json[r'user_id'] = userId;
  }
  if (channelId != null) {
    _json[r'channel_id'] = channelId;
  }
  if (rootId != null) {
    _json[r'root_id'] = rootId;
  }
  if (originalId != null) {
    _json[r'original_id'] = originalId;
  }
  if (message != null) {
    _json[r'message'] = message;
  }
  if (type != null) {
    _json[r'type'] = type;
  }
  if (props != null) {
    _json[r'props'] = props;
  }
  if (hashtag != null) {
    _json[r'hashtag'] = hashtag;
  }
  _json[r'file_ids'] = fileIds;
  if (pendingPostId != null) {
    _json[r'pending_post_id'] = pendingPostId;
  }
  if (metadata != null) {
    _json[r'metadata'] = metadata;
  }
  return _json;
}