import 'package:freezed_annotation/freezed_annotation.dart';

part 'inventory_model.freezed.dart';
part 'inventory_model.g.dart';

@freezed
abstract class InventoryModel with _$InventoryModel {
  const factory InventoryModel({
    int? id,
    String? key,
    String? createDate,
    String? modifyDate,
    bool? trash,
    String? name,
    int? provinceGovernmentalCarcassesQuantity,
    int? provinceGovernmentalCarcassesWeight,
    int? provinceFreeCarcassesQuantity,
    int? provinceFreeCarcassesWeight,
    int? receiveGovernmentalCarcassesQuantity,
    int? receiveGovernmentalCarcassesWeight,
    int? receiveFreeCarcassesQuantity,
    int? receiveFreeCarcassesWeight,
    int? freeBuyingCarcassesQuantity,
    int? freeBuyingCarcassesWeight,
    int? totalGovernmentalCarcassesQuantity,
    int? totalGovernmentalCarcassesWeight,
    int? totalFreeBarsCarcassesQuantity,
    int? totalFreeBarsCarcassesWeight,
    double? weightAverage,
    int? totalCarcassesQuantity,
    int? totalCarcassesWeight,
    int? freezingQuantity,
    int? freezingWeight,
    int? lossWeight,
    int? outProvinceAllocatedQuantity,
    int? outProvinceAllocatedWeight,
    int? provinceAllocatedQuantity,
    int? provinceAllocatedWeight,
    int? realAllocatedQuantity,
    int? realAllocatedWeight,
    int? coldHouseAllocatedWeight,
    int? posAllocatedWeight,
    int? segmentationWeight,
    int? totalRemainQuantity,
    int? totalRemainWeight,
    int? freePrice,
    int? approvedPrice,
    bool? approvedPriceStatus,
    int? parentProduct,
    int? killHouse,
    int? guild,
  }) = _InventoryModel; // Changed to _InventoryModel

  factory InventoryModel.fromJson(Map<String, dynamic> json) =>
      _$InventoryModelFromJson(json);
}