barcode_scanner/lib/backend/schema/product/product_struct.dart
mandreshope 83a20c548b feat: Integrates ObjectBox and updates Product ID
Adds the ObjectBox database dependency for local data persistence.

Updates the Product ID field type from nullable String to non-nullable int with a default value of 0 to align with ObjectBox's integer ID requirements. Includes necessary generated files for plugin registration and model serialization.
2025-07-03 16:01:45 +03:00

20 lines
482 B
Dart

import 'package:freezed_annotation/freezed_annotation.dart';
part 'product_struct.freezed.dart';
part 'product_struct.g.dart';
@Freezed(toJson: true)
abstract class ProductStruct with _$ProductStruct {
factory ProductStruct({
@Default(0) int id,
String? code,
String? name,
String? description,
String? price,
String? quantity,
}) = _ProductStruct;
factory ProductStruct.fromJson(Map<String, dynamic> json) =>
_$ProductStructFromJson(json);
}