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