medora-provider/lib/data/models/telemed_user.dart
DhanshCOSQ 66c3b2fb9c Patient registration complete with authentication flow fixed (#3)
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>
2024-10-31 14:20:35 +00:00

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,
};
}
}