Patient registration complete with authentication flow fixed Co-authored-by: Benoy Bose <benoybose@gmail.com> Co-authored-by: Jipson George <152465898+Jipson-cosq@users.noreply.github.com> Reviewed-on: cosqnet/telemednet#3 Reviewed-by: Benoy Bose <benoybose@cosq.net> Co-authored-by: DhanshCOSQ <dhanshas@cosq.net> Co-committed-by: DhanshCOSQ <dhanshas@cosq.net>
30 lines
601 B
Dart
30 lines
601 B
Dart
class TelemedUser {
|
|
late String uid;
|
|
String? email;
|
|
String? phoneNumber;
|
|
late String role;
|
|
|
|
TelemedUser({
|
|
required this.uid,
|
|
this.email,
|
|
this.phoneNumber,
|
|
required this.role,
|
|
});
|
|
|
|
TelemedUser.fromJson(Map<String, dynamic> json, String userId) {
|
|
uid = userId;
|
|
email = json['email'] as String?;
|
|
phoneNumber = json['phoneNumber'] as String?;
|
|
role = (json['UserType'] ?? json['role']) as String;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'uid': uid,
|
|
'email': email,
|
|
'phoneNumber': phoneNumber,
|
|
'UserType': role,
|
|
};
|
|
}
|
|
}
|