feat: update split bill
This commit is contained in:
@@ -121,17 +121,17 @@ class PaymentSplitBillRequest {
|
||||
|
||||
class SplitItem {
|
||||
final String orderItemId;
|
||||
final int amount;
|
||||
final int quantity;
|
||||
|
||||
SplitItem({
|
||||
required this.orderItemId,
|
||||
required this.amount,
|
||||
required this.quantity,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'order_item_id': orderItemId,
|
||||
'amount': amount,
|
||||
'quantity': quantity,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,6 +244,7 @@ class OrderItem {
|
||||
DateTime? createdAt;
|
||||
DateTime? updatedAt;
|
||||
String? printerType;
|
||||
int? paidQuantity;
|
||||
|
||||
OrderItem({
|
||||
this.id,
|
||||
@@ -261,6 +262,7 @@ class OrderItem {
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.printerType,
|
||||
this.paidQuantity,
|
||||
});
|
||||
|
||||
factory OrderItem.fromMap(Map<String, dynamic> map) {
|
||||
@@ -281,6 +283,7 @@ class OrderItem {
|
||||
createdAt: DateTime.parse(map['created_at']),
|
||||
updatedAt: DateTime.parse(map['updated_at']),
|
||||
printerType: map['printer_type'],
|
||||
paidQuantity: map['paid_quantity'],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -301,6 +304,7 @@ class OrderItem {
|
||||
'created_at': createdAt?.toIso8601String(),
|
||||
'updated_at': updatedAt?.toIso8601String(),
|
||||
'printer_type': printerType,
|
||||
'paid_quantity': paidQuantity,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user