Map<String, dynamic> toJson() { return { "membership_state": membershipState, "team_id": teamId.toString(), "user": user.toJson(), "role": role }; }