Application/medcify/lib/models/order_detail_item.dart
2022-09-26 12:03:52 +05:30

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"] ?? "";
}
}