feat: update order detail
This commit is contained in:
@@ -129,6 +129,7 @@ class Order {
|
||||
final List<Payment>? payments;
|
||||
final int? totalPaid;
|
||||
final int? paymentCount;
|
||||
final String? splitType;
|
||||
|
||||
Order({
|
||||
this.id,
|
||||
@@ -156,6 +157,7 @@ class Order {
|
||||
this.payments,
|
||||
this.totalPaid,
|
||||
this.paymentCount,
|
||||
this.splitType,
|
||||
});
|
||||
|
||||
factory Order.fromMap(Map<String, dynamic> map) {
|
||||
@@ -190,6 +192,7 @@ class Order {
|
||||
: List<Payment>.from(map['payments'].map((x) => Payment.fromMap(x))),
|
||||
totalPaid: map['total_paid'],
|
||||
paymentCount: map['payment_count'],
|
||||
splitType: map['split_type'] ?? "",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -220,6 +223,7 @@ class Order {
|
||||
'payments': payments?.map((x) => x.toMap()).toList(),
|
||||
'total_paid': totalPaid,
|
||||
'payment_count': paymentCount,
|
||||
'split_type': splitType,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user