toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
    json[r'role'] = this.role;
  if (this.email != null) {
    json[r'email'] = this.email;
  } else {
    json[r'email'] = null;
  }
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
  if (this.avatar != null) {
    json[r'avatar'] = this.avatar;
  } else {
    json[r'avatar'] = null;
  }
    json[r'joinedAt'] = this.joinedAt.toUtc().toIso8601String();
    json[r'user'] = this.user;
  return json;
}