feat: update split bill

This commit is contained in:
efrilm
2025-08-08 23:04:35 +07:00
parent b7ab9c6939
commit 670a0b6414
5 changed files with 198 additions and 43 deletions
+3 -3
View File
@@ -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,
};
}
}