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,43 @@
import 'package:enaklo_pos/core/extensions/int_ext.dart';
import 'product_category.dart';
class ProductModel {
final String image;
final String name;
final ProductCategory category;
final int price;
final int stock;
ProductModel({
required this.image,
required this.name,
required this.category,
required this.price,
required this.stock,
});
String get priceFormat => price.currencyFormatRp;
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is ProductModel &&
other.image == image &&
other.name == name &&
other.category == category &&
other.price == price &&
other.stock == stock;
}
@override
int get hashCode {
return image.hashCode ^
name.hashCode ^
category.hashCode ^
price.hashCode ^
stock.hashCode;
}
}