-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,001 additions
and
133 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
class AppointmentModel { | ||
AppointmentModel({ | ||
this.isAppointmentCancelled, | ||
this.id, | ||
this.time, | ||
this.name, | ||
this.email, | ||
this.address, | ||
this.phoneNumber, | ||
this.nic, | ||
this.city, | ||
this.province, | ||
this.isChargeChecked, | ||
this.isPdfChecked, | ||
this.referenceNo, | ||
this.hospitalName, | ||
this.date, | ||
this.totalAmount, | ||
this.specialization, | ||
this.doctorName, | ||
this.createdAt, | ||
this.updatedAt, | ||
this.v, | ||
}); | ||
|
||
bool isAppointmentCancelled; | ||
String id; | ||
String time; | ||
String name; | ||
String email; | ||
String address; | ||
String phoneNumber; | ||
String nic; | ||
String city; | ||
String province; | ||
bool isChargeChecked; | ||
bool isPdfChecked; | ||
String referenceNo; | ||
String hospitalName; | ||
DateTime date; | ||
int totalAmount; | ||
DateTime createdAt; | ||
DateTime updatedAt; | ||
String doctorName; | ||
String specialization; | ||
int v; | ||
|
||
factory AppointmentModel.fromJson(Map<String, dynamic> json) => | ||
AppointmentModel( | ||
isAppointmentCancelled: json["isAppointmentCancelled"], | ||
id: json["_id"], | ||
time: json["time"], | ||
name: json["name"], | ||
email: json["email"], | ||
address: json["address"], | ||
phoneNumber: json["phoneNumber"], | ||
nic: json["nic"], | ||
city: json["city"], | ||
province: json["province"], | ||
isChargeChecked: json["isChargeChecked"], | ||
isPdfChecked: json["isPDFChecked"], | ||
referenceNo: json["referenceNo"], | ||
hospitalName: json["hospitalName"], | ||
date: DateTime.parse(json["date"]), | ||
totalAmount: json["totalAmount"], | ||
specialization: json["specialization"], | ||
doctorName: json["doctorName"], | ||
createdAt: DateTime.parse(json["createdAt"]), | ||
updatedAt: DateTime.parse(json["updatedAt"]), | ||
v: json["__v"], | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"isAppointmentCancelled": isAppointmentCancelled, | ||
"_id": id, | ||
"time": time, | ||
"name": name, | ||
"email": email, | ||
"address": address, | ||
"phoneNumber": phoneNumber, | ||
"nic": nic, | ||
"city": city, | ||
"province": province, | ||
"isChargeChecked": isChargeChecked, | ||
"isPDFChecked": isPdfChecked, | ||
"referenceNo": referenceNo, | ||
"doctorName": doctorName, | ||
"hospitalName": hospitalName, | ||
"specialization": specialization, | ||
"date": | ||
"${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}", | ||
"totalAmount": totalAmount, | ||
"createdAt": createdAt.toIso8601String(), | ||
"updatedAt": updatedAt.toIso8601String(), | ||
"__v": v, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class UserAuthModel { | ||
UserAuthModel({ | ||
this.userId, | ||
this.name, | ||
this.email, | ||
this.phoneNumber, | ||
}); | ||
|
||
String userId; | ||
String name; | ||
String email; | ||
String phoneNumber; | ||
|
||
factory UserAuthModel.fromJson(Map<String, dynamic> json) => UserAuthModel( | ||
userId: json["user_id"], | ||
name: json["name"], | ||
email: json["email"], | ||
phoneNumber: json["phoneNumber"], | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"user_id": userId, | ||
"name": name, | ||
"email": email, | ||
"phoneNumber": phoneNumber, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
class UserModel { | ||
UserModel({ | ||
this.id, | ||
this.name, | ||
this.email, | ||
this.phoneNumber, | ||
this.gender, | ||
this.password, | ||
this.imageUrl, | ||
this.country, | ||
this.nic, | ||
this.createdAt, | ||
this.updatedAt, | ||
this.v, | ||
}); | ||
|
||
String id; | ||
String name; | ||
String email; | ||
String phoneNumber; | ||
String gender; | ||
String password; | ||
String imageUrl; | ||
String country; | ||
String nic; | ||
DateTime createdAt; | ||
DateTime updatedAt; | ||
int v; | ||
|
||
factory UserModel.fromJson(Map<String, dynamic> json) => UserModel( | ||
id: json["_id"], | ||
name: json["name"], | ||
email: json["email"], | ||
phoneNumber: json["phoneNumber"], | ||
gender: json["gender"], | ||
password: json["password"], | ||
imageUrl: json["imageUrl"], | ||
country: json["country"], | ||
nic: json["nic"], | ||
createdAt: DateTime.parse(json["createdAt"]), | ||
updatedAt: DateTime.parse(json["updatedAt"]), | ||
v: json["__v"], | ||
); | ||
|
||
Map<String, dynamic> toJson() => { | ||
"_id": id, | ||
"name": name, | ||
"email": email, | ||
"phoneNumber": phoneNumber, | ||
"gender": gender, | ||
"password": password, | ||
"imageUrl": imageUrl, | ||
"country": country, | ||
"nic": nic, | ||
"createdAt": createdAt.toIso8601String(), | ||
"updatedAt": updatedAt.toIso8601String(), | ||
"__v": v, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.