first commit

This commit is contained in:
Aditya Siregar
2025-07-30 22:38:44 +07:00
commit 73320561b0
444 changed files with 64633 additions and 0 deletions
@@ -0,0 +1,31 @@
import 'package:enaklo_pos/data/models/response/product_response_model.dart';
import 'product_model.dart';
class OrderItem {
final Product product;
int quantity;
OrderItem({
required this.product,
required this.quantity,
});
factory OrderItem.fromMap(Map<String, dynamic> map) {
return OrderItem(
product: Product.fromMap(map['product']),
quantity: map['quantity']?.toInt() ?? 0,
);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is OrderItem &&
other.product == product &&
other.quantity == quantity;
}
@override
int get hashCode => product.hashCode ^ quantity.hashCode;
}