fixed bugs Co-authored-by: DhanshCOSQ <dhanshas@cosq.net> Co-authored-by: Jipson George <152465898+Jipson-cosq@users.noreply.github.com> Reviewed-on: cosqnet/telemednet#9 Reviewed-by: Benoy Bose <benoybose@cosq.net> Co-authored-by: Jipson George <jipsongeorge@cosq.net> Co-committed-by: Jipson George <jipsongeorge@cosq.net>
94 lines
2.6 KiB
Dart
94 lines
2.6 KiB
Dart
class Doctor {
|
|
List<String>? achievements;
|
|
String? uid;
|
|
String? profileImage;
|
|
String? profileImageUrl;
|
|
String? speciality;
|
|
String? yearsOfExperience;
|
|
String? licenseNumber;
|
|
String? profileDescription;
|
|
String? digitalSignature;
|
|
String? title;
|
|
String? surName;
|
|
String? middleName;
|
|
String? firstName;
|
|
List<String>? qualifications = [];
|
|
String? floorBuilding;
|
|
String? street;
|
|
String? city;
|
|
String? state;
|
|
String? country;
|
|
String? postalCode;
|
|
String? addressType;
|
|
|
|
Doctor({
|
|
this.addressType,
|
|
this.achievements,
|
|
this.profileImageUrl,
|
|
this.profileImage, // Initialize with empty list
|
|
this.speciality,
|
|
this.yearsOfExperience,
|
|
this.licenseNumber,
|
|
this.profileDescription,
|
|
this.digitalSignature,
|
|
this.title,
|
|
this.surName,
|
|
this.middleName,
|
|
this.firstName,
|
|
this.qualifications,
|
|
this.floorBuilding,
|
|
this.street,
|
|
this.city,
|
|
this.state,
|
|
this.country,
|
|
this.postalCode,
|
|
this.uid,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'profileImagePath': profileImageUrl,
|
|
'profileImage': profileImage,
|
|
'achievements': achievements,
|
|
'speciality': speciality,
|
|
'yearsOfExperience': yearsOfExperience,
|
|
'licenseNumber': licenseNumber,
|
|
'profileDescription': profileDescription,
|
|
'digitalSignature': digitalSignature,
|
|
'title': title,
|
|
'surname': surName,
|
|
'firstName': firstName,
|
|
'middleName': middleName,
|
|
'qualifications': qualifications,
|
|
'floorBuilding': floorBuilding,
|
|
'street': street,
|
|
'city': city,
|
|
'state': state,
|
|
'country': country,
|
|
'postalCode': postalCode,
|
|
'addressType': addressType
|
|
};
|
|
|
|
static Doctor fromJson(Map<String, dynamic> json) => Doctor(
|
|
achievements: List<String>.from(json['achievements'] ?? []),
|
|
profileImageUrl: json['profileImageUrl'],
|
|
profileImage: json['profileImage'],
|
|
speciality: json['speciality'],
|
|
yearsOfExperience: json['yearsOfExperience'],
|
|
licenseNumber: json['licenseNumber'],
|
|
profileDescription: json['profileDescription'],
|
|
digitalSignature: json['digitalSignature'],
|
|
title: json['title'],
|
|
surName: json['surname'],
|
|
middleName: json['middleName'],
|
|
firstName: json['firstName'],
|
|
qualifications: List<String>.from(json['qualifications'] ?? []),
|
|
floorBuilding: json['floorBuilding'],
|
|
street: json['street'],
|
|
city: json['city'],
|
|
state: json['state'],
|
|
country: json['country'],
|
|
postalCode: json['postalCode'],
|
|
addressType: json['addressType'],
|
|
uid: json['uid']);
|
|
}
|