enum UserRole { doctor, patient }

class TelemedUser {
  String uid;
  late String? name;
  late String? email;
  late String? photoURL;
  late String? phoneNumber;
  late String? alterPhoneNumber;
  late UserRole? role;
  TelemedUser(
      {required this.uid,
      this.name,
      this.email,
      this.photoURL,
      this.phoneNumber,
      this.alterPhoneNumber,
      this.role});

  TelemedUser.fromJson(Map<String, dynamic> json, this.uid) {
    uid = json['uid'];
    name = json['name'];
    email = json['email'];
    photoURL = json['photoURL'];
    phoneNumber = json['phoneNumber'];
    alterPhoneNumber = json['alterPhoneNumber'];
    role = json['role'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['uid'] = uid;
    data['name'] = name;
    data['email'] = email;
    data['photoURL'] = photoURL;
    data['phoneNumber'] = phoneNumber;
    data['alterPhoneNumber'] = alterPhoneNumber;
    data['role'] = role;
    return data;
  }
}
