25 lines
563 B
Dart
25 lines
563 B
Dart
class OrderDetailItem{
|
|
int? qty;
|
|
dynamic amount;
|
|
dynamic discount;
|
|
dynamic total;
|
|
OrderMedicineItem? medicine;
|
|
|
|
OrderDetailItem.fromJson(Map<String, dynamic> json){
|
|
qty = json["quantity"] ?? 0;
|
|
amount = json["amount"] ?? 0;
|
|
discount = json["discount"] ?? 0;
|
|
total = json["total"] ?? 0;
|
|
medicine = (json["medicine"] != null) ? OrderMedicineItem.fromJson(json["medicine"]) : null;
|
|
}
|
|
}
|
|
|
|
class OrderMedicineItem{
|
|
String? name;
|
|
|
|
OrderMedicineItem.fromJson(Map<String, dynamic> json){
|
|
name = json["medicineName"] ?? "";
|
|
}
|
|
}
|
|
|