import 'package:niogu_app/core/enums/item_type.dart';

enum DifferenceType {
  suitable('suitable'),
  less('less'),
  more('more');

  final String type;

  const DifferenceType(this.type);
}

class SelectedCheckedItem {
  final String id;
  final ItemType itemType;
  final String itemId;
  final DifferenceType differenceType;
  final double costPrice;
  final double purchasePrice;
  final double remainingStock;
  final double quantity;
  final String? note;

  const SelectedCheckedItem({
    required this.id,
    required this.itemType,
    required this.itemId,
    required this.differenceType,
    required this.costPrice,
    required this.purchasePrice,
    required this.remainingStock,
    required this.quantity,
    this.note
  });

  SelectedCheckedItem copyWith({double? quantity, String? note}) {
    return SelectedCheckedItem(
      id: id,
      itemType: itemType,
      itemId: itemId,
      differenceType: differenceType,
      costPrice: costPrice,
      purchasePrice: purchasePrice,
      remainingStock: remainingStock,
      quantity: quantity ?? this.quantity,
      note: note ?? this.note
    );
  }
}
