mandreshope 61047f266d chore: Renames project to e_scan
Performs a comprehensive project rename from 'barcode_scanner' to 'e_scan' (or 'eScan' for user-facing labels). This update spans all relevant files, including:

- Application IDs and bundle identifiers for Android, iOS, macOS, and Linux.
- VS Code launch configurations.
- Dart package import paths.
- Project names and titles in `pubspec.yaml`, `README.md`, and platform-specific configurations (e.g., CMakeLists, Info.plist, AndroidManifest).
2025-07-30 09:19:44 +03:00

33 lines
790 B
Dart

import 'package:e_scan/backend/objectbox/entities/product/product_entity.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'product_model.freezed.dart';
part 'product_model.g.dart';
@Freezed(toJson: true)
abstract class ProductModel with _$ProductModel {
factory ProductModel({
@Default(0) int id,
String? code,
String? name,
String? description,
String? price,
String? quantity,
String? image,
}) = _ProductModel;
factory ProductModel.fromJson(Map<String, dynamic> json) =>
_$ProductModelFromJson(json);
}
extension ProductModelExt on ProductModel {
ProductEntity get toEntity => ProductEntity(
id: id,
name: name,
description: description,
price: price,
quantity: quantity,
image: image,
);
}