// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'analytic_dtos.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

_$DashboardAnalyticDtoImpl _$$DashboardAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$DashboardAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  dateFrom: json['date_from'] as String?,
  dateTo: json['date_to'] as String?,
  overview: json['overview'] == null
      ? null
      : DashboardOverviewDto.fromJson(json['overview'] as Map<String, dynamic>),
  topProducts: (json['top_products'] as List<dynamic>?)
      ?.map((e) => DashboardTopProductDto.fromJson(e as Map<String, dynamic>))
      .toList(),
  paymentMethods: (json['payment_methods'] as List<dynamic>?)
      ?.map(
        (e) => DashboardPaymentMethodDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
  recentSales: (json['recent_sales'] as List<dynamic>?)
      ?.map((e) => DashboardRecentSaleDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

Map<String, dynamic> _$$DashboardAnalyticDtoImplToJson(
  _$DashboardAnalyticDtoImpl instance,
) => <String, dynamic>{
  'organization_id': instance.organizationId,
  'outlet_id': instance.outletId,
  'date_from': instance.dateFrom,
  'date_to': instance.dateTo,
  'overview': instance.overview,
  'top_products': instance.topProducts,
  'payment_methods': instance.paymentMethods,
  'recent_sales': instance.recentSales,
};

_$DashboardOverviewDtoImpl _$$DashboardOverviewDtoImplFromJson(
  Map<String, dynamic> json,
) => _$DashboardOverviewDtoImpl(
  totalSales: (json['total_sales'] as num?)?.toInt(),
  totalOrders: (json['total_orders'] as num?)?.toInt(),
  averageOrderValue: (json['average_order_value'] as num?)?.toDouble(),
  totalCustomers: (json['total_customers'] as num?)?.toInt(),
  voidedOrders: (json['voided_orders'] as num?)?.toInt(),
  refundedOrders: (json['refunded_orders'] as num?)?.toInt(),
);

Map<String, dynamic> _$$DashboardOverviewDtoImplToJson(
  _$DashboardOverviewDtoImpl instance,
) => <String, dynamic>{
  'total_sales': instance.totalSales,
  'total_orders': instance.totalOrders,
  'average_order_value': instance.averageOrderValue,
  'total_customers': instance.totalCustomers,
  'voided_orders': instance.voidedOrders,
  'refunded_orders': instance.refundedOrders,
};

_$DashboardTopProductDtoImpl _$$DashboardTopProductDtoImplFromJson(
  Map<String, dynamic> json,
) => _$DashboardTopProductDtoImpl(
  productId: json['product_id'] as String?,
  productName: json['product_name'] as String?,
  categoryId: json['category_id'] as String?,
  categoryName: json['category_name'] as String?,
  quantitySold: (json['quantity_sold'] as num?)?.toInt(),
  revenue: (json['revenue'] as num?)?.toInt(),
  averagePrice: (json['average_price'] as num?)?.toDouble(),
  orderCount: (json['order_count'] as num?)?.toInt(),
);

Map<String, dynamic> _$$DashboardTopProductDtoImplToJson(
  _$DashboardTopProductDtoImpl instance,
) => <String, dynamic>{
  'product_id': instance.productId,
  'product_name': instance.productName,
  'category_id': instance.categoryId,
  'category_name': instance.categoryName,
  'quantity_sold': instance.quantitySold,
  'revenue': instance.revenue,
  'average_price': instance.averagePrice,
  'order_count': instance.orderCount,
};

_$DashboardPaymentMethodDtoImpl _$$DashboardPaymentMethodDtoImplFromJson(
  Map<String, dynamic> json,
) => _$DashboardPaymentMethodDtoImpl(
  paymentMethodId: json['payment_method_id'] as String?,
  paymentMethodName: json['payment_method_name'] as String?,
  paymentMethodType: json['payment_method_type'] as String?,
  totalAmount: (json['total_amount'] as num?)?.toInt(),
  orderCount: (json['order_count'] as num?)?.toInt(),
  paymentCount: (json['payment_count'] as num?)?.toInt(),
  percentage: (json['percentage'] as num?)?.toDouble(),
);

Map<String, dynamic> _$$DashboardPaymentMethodDtoImplToJson(
  _$DashboardPaymentMethodDtoImpl instance,
) => <String, dynamic>{
  'payment_method_id': instance.paymentMethodId,
  'payment_method_name': instance.paymentMethodName,
  'payment_method_type': instance.paymentMethodType,
  'total_amount': instance.totalAmount,
  'order_count': instance.orderCount,
  'payment_count': instance.paymentCount,
  'percentage': instance.percentage,
};

_$DashboardRecentSaleDtoImpl _$$DashboardRecentSaleDtoImplFromJson(
  Map<String, dynamic> json,
) => _$DashboardRecentSaleDtoImpl(
  date: json['date'] as String?,
  sales: (json['sales'] as num?)?.toInt(),
  orders: (json['orders'] as num?)?.toInt(),
  items: (json['items'] as num?)?.toInt(),
  tax: (json['tax'] as num?)?.toInt(),
  discount: (json['discount'] as num?)?.toInt(),
  netSales: (json['net_sales'] as num?)?.toInt(),
);

Map<String, dynamic> _$$DashboardRecentSaleDtoImplToJson(
  _$DashboardRecentSaleDtoImpl instance,
) => <String, dynamic>{
  'date': instance.date,
  'sales': instance.sales,
  'orders': instance.orders,
  'items': instance.items,
  'tax': instance.tax,
  'discount': instance.discount,
  'net_sales': instance.netSales,
};

_$SalesAnalyticDtoImpl _$$SalesAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$SalesAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  dateFrom: json['date_from'] == null
      ? null
      : DateTime.parse(json['date_from'] as String),
  dateTo: json['date_to'] == null
      ? null
      : DateTime.parse(json['date_to'] as String),
  groupBy: json['group_by'] as String?,
  summary: json['summary'] == null
      ? null
      : SalesSummaryDto.fromJson(json['summary'] as Map<String, dynamic>),
  data: (json['data'] as List<dynamic>?)
      ?.map((e) => SalesAnalyticItemDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

Map<String, dynamic> _$$SalesAnalyticDtoImplToJson(
  _$SalesAnalyticDtoImpl instance,
) => <String, dynamic>{
  'organization_id': instance.organizationId,
  'outlet_id': instance.outletId,
  'date_from': instance.dateFrom?.toIso8601String(),
  'date_to': instance.dateTo?.toIso8601String(),
  'group_by': instance.groupBy,
  'summary': instance.summary,
  'data': instance.data,
};

_$SalesSummaryDtoImpl _$$SalesSummaryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$SalesSummaryDtoImpl(
  totalSales: (json['total_sales'] as num?)?.toInt(),
  totalOrders: (json['total_orders'] as num?)?.toInt(),
  totalItems: (json['total_items'] as num?)?.toInt(),
  averageOrderValue: (json['average_order_value'] as num?)?.toDouble(),
  totalTax: (json['total_tax'] as num?)?.toInt(),
  totalDiscount: (json['total_discount'] as num?)?.toInt(),
  netSales: (json['net_sales'] as num?)?.toInt(),
);

Map<String, dynamic> _$$SalesSummaryDtoImplToJson(
  _$SalesSummaryDtoImpl instance,
) => <String, dynamic>{
  'total_sales': instance.totalSales,
  'total_orders': instance.totalOrders,
  'total_items': instance.totalItems,
  'average_order_value': instance.averageOrderValue,
  'total_tax': instance.totalTax,
  'total_discount': instance.totalDiscount,
  'net_sales': instance.netSales,
};

_$SalesAnalyticItemDtoImpl _$$SalesAnalyticItemDtoImplFromJson(
  Map<String, dynamic> json,
) => _$SalesAnalyticItemDtoImpl(
  date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
  sales: (json['sales'] as num?)?.toInt(),
  orders: (json['orders'] as num?)?.toInt(),
  items: (json['items'] as num?)?.toInt(),
  tax: (json['tax'] as num?)?.toInt(),
  discount: (json['discount'] as num?)?.toInt(),
  netSales: (json['net_sales'] as num?)?.toInt(),
);

Map<String, dynamic> _$$SalesAnalyticItemDtoImplToJson(
  _$SalesAnalyticItemDtoImpl instance,
) => <String, dynamic>{
  'date': instance.date?.toIso8601String(),
  'sales': instance.sales,
  'orders': instance.orders,
  'items': instance.items,
  'tax': instance.tax,
  'discount': instance.discount,
  'net_sales': instance.netSales,
};

_$ProductAnalyticDtoImpl _$$ProductAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProductAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  dateFrom: json['date_from'] == null
      ? null
      : DateTime.parse(json['date_from'] as String),
  dateTo: json['date_to'] == null
      ? null
      : DateTime.parse(json['date_to'] as String),
  data: (json['data'] as List<dynamic>?)
      ?.map((e) => ProductAnalyticItemDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

Map<String, dynamic> _$$ProductAnalyticDtoImplToJson(
  _$ProductAnalyticDtoImpl instance,
) => <String, dynamic>{
  'organization_id': instance.organizationId,
  'outlet_id': instance.outletId,
  'date_from': instance.dateFrom?.toIso8601String(),
  'date_to': instance.dateTo?.toIso8601String(),
  'data': instance.data,
};

_$ProductAnalyticItemDtoImpl _$$ProductAnalyticItemDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProductAnalyticItemDtoImpl(
  productId: json['product_id'] as String?,
  productName: json['product_name'] as String?,
  categoryId: json['category_id'] as String?,
  categoryName: json['category_name'] as String?,
  quantitySold: (json['quantity_sold'] as num?)?.toInt(),
  revenue: (json['revenue'] as num?)?.toInt(),
  averagePrice: (json['average_price'] as num?)?.toDouble(),
  orderCount: (json['order_count'] as num?)?.toInt(),
);

Map<String, dynamic> _$$ProductAnalyticItemDtoImplToJson(
  _$ProductAnalyticItemDtoImpl instance,
) => <String, dynamic>{
  'product_id': instance.productId,
  'product_name': instance.productName,
  'category_id': instance.categoryId,
  'category_name': instance.categoryName,
  'quantity_sold': instance.quantitySold,
  'revenue': instance.revenue,
  'average_price': instance.averagePrice,
  'order_count': instance.orderCount,
};

_$PaymentMethodAnalyticDtoImpl _$$PaymentMethodAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PaymentMethodAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  dateFrom: json['date_from'] == null
      ? null
      : DateTime.parse(json['date_from'] as String),
  dateTo: json['date_to'] == null
      ? null
      : DateTime.parse(json['date_to'] as String),
  groupBy: json['group_by'] as String?,
  summary: json['summary'] == null
      ? null
      : PaymentMethodAnalyticSummaryDto.fromJson(
          json['summary'] as Map<String, dynamic>,
        ),
  data: (json['data'] as List<dynamic>?)
      ?.map(
        (e) => PaymentMethodAnalyticItemDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
);

Map<String, dynamic> _$$PaymentMethodAnalyticDtoImplToJson(
  _$PaymentMethodAnalyticDtoImpl instance,
) => <String, dynamic>{
  'organization_id': instance.organizationId,
  'outlet_id': instance.outletId,
  'date_from': instance.dateFrom?.toIso8601String(),
  'date_to': instance.dateTo?.toIso8601String(),
  'group_by': instance.groupBy,
  'summary': instance.summary,
  'data': instance.data,
};

_$PaymentMethodAnalyticItemDtoImpl _$$PaymentMethodAnalyticItemDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PaymentMethodAnalyticItemDtoImpl(
  paymentMethodId: json['payment_method_id'] as String?,
  paymentMethodName: json['payment_method_name'] as String?,
  paymentMethodType: json['payment_method_type'] as String?,
  totalAmount: (json['total_amount'] as num?)?.toInt(),
  orderCount: (json['order_count'] as num?)?.toInt(),
  paymentCount: (json['payment_count'] as num?)?.toInt(),
  percentage: json['percentage'] as num?,
);

Map<String, dynamic> _$$PaymentMethodAnalyticItemDtoImplToJson(
  _$PaymentMethodAnalyticItemDtoImpl instance,
) => <String, dynamic>{
  'payment_method_id': instance.paymentMethodId,
  'payment_method_name': instance.paymentMethodName,
  'payment_method_type': instance.paymentMethodType,
  'total_amount': instance.totalAmount,
  'order_count': instance.orderCount,
  'payment_count': instance.paymentCount,
  'percentage': instance.percentage,
};

_$PaymentMethodAnalyticSummaryDtoImpl
_$$PaymentMethodAnalyticSummaryDtoImplFromJson(Map<String, dynamic> json) =>
    _$PaymentMethodAnalyticSummaryDtoImpl(
      totalAmount: (json['total_amount'] as num?)?.toInt(),
      totalOrders: (json['total_orders'] as num?)?.toInt(),
      totalPayments: (json['total_payments'] as num?)?.toInt(),
      averageOrderValue: (json['average_order_value'] as num?)?.toDouble(),
    );

Map<String, dynamic> _$$PaymentMethodAnalyticSummaryDtoImplToJson(
  _$PaymentMethodAnalyticSummaryDtoImpl instance,
) => <String, dynamic>{
  'total_amount': instance.totalAmount,
  'total_orders': instance.totalOrders,
  'total_payments': instance.totalPayments,
  'average_order_value': instance.averageOrderValue,
};

_$ProfitLossAnalyticDtoImpl _$$ProfitLossAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  dateFrom: json['date_from'] as String?,
  dateTo: json['date_to'] as String?,
  groupBy: json['group_by'] as String?,
  summary: json['summary'] == null
      ? null
      : ProfitLossAnalyticSummaryDto.fromJson(
          json['summary'] as Map<String, dynamic>,
        ),
  data: (json['data'] as List<dynamic>?)
      ?.map(
        (e) => ProfitLossAnalyticItemDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
  productData: (json['product_data'] as List<dynamic>?)
      ?.map(
        (e) => ProfitLossAnalyticProductDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
);

Map<String, dynamic> _$$ProfitLossAnalyticDtoImplToJson(
  _$ProfitLossAnalyticDtoImpl instance,
) => <String, dynamic>{
  'organization_id': instance.organizationId,
  'date_from': instance.dateFrom,
  'date_to': instance.dateTo,
  'group_by': instance.groupBy,
  'summary': instance.summary,
  'data': instance.data,
  'product_data': instance.productData,
};

_$ProfitLossAnalyticSummaryDtoImpl _$$ProfitLossAnalyticSummaryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossAnalyticSummaryDtoImpl(
  totalRevenue: (json['total_revenue'] as num?)?.toInt(),
  totalCost: json['total_cost'] as num?,
  grossProfit: json['gross_profit'] as num?,
  grossProfitMargin: (json['gross_profit_margin'] as num?)?.toDouble(),
  totalTax: (json['total_tax'] as num?)?.toInt(),
  totalDiscount: (json['total_discount'] as num?)?.toInt(),
  netProfit: json['net_profit'] as num?,
  netProfitMargin: (json['net_profit_margin'] as num?)?.toDouble(),
  totalOrders: (json['total_orders'] as num?)?.toInt(),
  averageProfit: (json['average_profit'] as num?)?.toDouble(),
  profitabilityRatio: (json['profitability_ratio'] as num?)?.toDouble(),
);

Map<String, dynamic> _$$ProfitLossAnalyticSummaryDtoImplToJson(
  _$ProfitLossAnalyticSummaryDtoImpl instance,
) => <String, dynamic>{
  'total_revenue': instance.totalRevenue,
  'total_cost': instance.totalCost,
  'gross_profit': instance.grossProfit,
  'gross_profit_margin': instance.grossProfitMargin,
  'total_tax': instance.totalTax,
  'total_discount': instance.totalDiscount,
  'net_profit': instance.netProfit,
  'net_profit_margin': instance.netProfitMargin,
  'total_orders': instance.totalOrders,
  'average_profit': instance.averageProfit,
  'profitability_ratio': instance.profitabilityRatio,
};

_$ProfitLossAnalyticItemDtoImpl _$$ProfitLossAnalyticItemDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossAnalyticItemDtoImpl(
  date: json['date'] as String?,
  revenue: (json['revenue'] as num?)?.toInt(),
  cost: json['cost'] as num?,
  grossProfit: json['gross_profit'] as num?,
  grossProfitMargin: (json['gross_profit_margin'] as num?)?.toDouble(),
  tax: (json['tax'] as num?)?.toInt(),
  discount: (json['discount'] as num?)?.toInt(),
  netProfit: json['net_profit'] as num?,
  netProfitMargin: (json['net_profit_margin'] as num?)?.toDouble(),
  orders: (json['orders'] as num?)?.toInt(),
);

Map<String, dynamic> _$$ProfitLossAnalyticItemDtoImplToJson(
  _$ProfitLossAnalyticItemDtoImpl instance,
) => <String, dynamic>{
  'date': instance.date,
  'revenue': instance.revenue,
  'cost': instance.cost,
  'gross_profit': instance.grossProfit,
  'gross_profit_margin': instance.grossProfitMargin,
  'tax': instance.tax,
  'discount': instance.discount,
  'net_profit': instance.netProfit,
  'net_profit_margin': instance.netProfitMargin,
  'orders': instance.orders,
};

_$ProfitLossAnalyticProductDtoImpl _$$ProfitLossAnalyticProductDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossAnalyticProductDtoImpl(
  productId: json['product_id'] as String?,
  productName: json['product_name'] as String?,
  categoryId: json['category_id'] as String?,
  categoryName: json['category_name'] as String?,
  quantitySold: (json['quantity_sold'] as num?)?.toInt(),
  revenue: (json['revenue'] as num?)?.toInt(),
  cost: json['cost'] as num?,
  grossProfit: json['gross_profit'] as num?,
  grossProfitMargin: (json['gross_profit_margin'] as num?)?.toDouble(),
  averagePrice: (json['average_price'] as num?)?.toInt(),
  averageCost: json['average_cost'] as num?,
  profitPerUnit: json['profit_per_unit'] as num?,
);

Map<String, dynamic> _$$ProfitLossAnalyticProductDtoImplToJson(
  _$ProfitLossAnalyticProductDtoImpl instance,
) => <String, dynamic>{
  'product_id': instance.productId,
  'product_name': instance.productName,
  'category_id': instance.categoryId,
  'category_name': instance.categoryName,
  'quantity_sold': instance.quantitySold,
  'revenue': instance.revenue,
  'cost': instance.cost,
  'gross_profit': instance.grossProfit,
  'gross_profit_margin': instance.grossProfitMargin,
  'average_price': instance.averagePrice,
  'average_cost': instance.averageCost,
  'profit_per_unit': instance.profitPerUnit,
};

_$CategoryAnalyticDtoImpl _$$CategoryAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$CategoryAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  dateFrom: json['date_from'] == null
      ? null
      : DateTime.parse(json['date_from'] as String),
  dateTo: json['date_to'] == null
      ? null
      : DateTime.parse(json['date_to'] as String),
  data: (json['data'] as List<dynamic>?)
      ?.map((e) => CategoryAnalyticItemDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

Map<String, dynamic> _$$CategoryAnalyticDtoImplToJson(
  _$CategoryAnalyticDtoImpl instance,
) => <String, dynamic>{
  'organization_id': instance.organizationId,
  'outlet_id': instance.outletId,
  'date_from': instance.dateFrom?.toIso8601String(),
  'date_to': instance.dateTo?.toIso8601String(),
  'data': instance.data,
};

_$CategoryAnalyticItemDtoImpl _$$CategoryAnalyticItemDtoImplFromJson(
  Map<String, dynamic> json,
) => _$CategoryAnalyticItemDtoImpl(
  categoryId: json['category_id'] as String?,
  categoryName: json['category_name'] as String?,
  totalRevenue: (json['total_revenue'] as num?)?.toInt(),
  totalQuantity: (json['total_quantity'] as num?)?.toInt(),
  productCount: (json['product_count'] as num?)?.toInt(),
  orderCount: (json['order_count'] as num?)?.toInt(),
);

Map<String, dynamic> _$$CategoryAnalyticItemDtoImplToJson(
  _$CategoryAnalyticItemDtoImpl instance,
) => <String, dynamic>{
  'category_id': instance.categoryId,
  'category_name': instance.categoryName,
  'total_revenue': instance.totalRevenue,
  'total_quantity': instance.totalQuantity,
  'product_count': instance.productCount,
  'order_count': instance.orderCount,
};

_$InventoryAnalyticDtoImpl _$$InventoryAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$InventoryAnalyticDtoImpl(
  summary: json['summary'] == null
      ? null
      : InventoryAnalyticSummaryDto.fromJson(
          json['summary'] as Map<String, dynamic>,
        ),
  products: (json['products'] as List<dynamic>?)
      ?.map(
        (e) =>
            InventoryAnalyticProductItemDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
  ingredients: (json['ingredients'] as List<dynamic>?)
      ?.map(
        (e) => InventoryAnalyticIngredientItemDto.fromJson(
          e as Map<String, dynamic>,
        ),
      )
      .toList(),
);

Map<String, dynamic> _$$InventoryAnalyticDtoImplToJson(
  _$InventoryAnalyticDtoImpl instance,
) => <String, dynamic>{
  'summary': instance.summary,
  'products': instance.products,
  'ingredients': instance.ingredients,
};

_$InventoryAnalyticSummaryDtoImpl _$$InventoryAnalyticSummaryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$InventoryAnalyticSummaryDtoImpl(
  totalProducts: (json['total_products'] as num?)?.toInt(),
  totalIngredients: (json['total_ingredients'] as num?)?.toInt(),
  totalValue: (json['total_value'] as num?)?.toInt(),
  lowStockProducts: (json['low_stock_products'] as num?)?.toInt(),
  lowStockIngredients: (json['low_stock_ingredients'] as num?)?.toInt(),
  zeroStockProducts: (json['zero_stock_products'] as num?)?.toInt(),
  zeroStockIngredients: (json['zero_stock_ingredients'] as num?)?.toInt(),
  totalSoldProducts: (json['total_sold_products'] as num?)?.toInt(),
  totalSoldIngredients: (json['total_sold_ingredients'] as num?)?.toInt(),
  outletId: json['outlet_id'] as String?,
  outletName: json['outlet_name'] as String?,
  generatedAt: json['generated_at'] == null
      ? null
      : DateTime.parse(json['generated_at'] as String),
);

Map<String, dynamic> _$$InventoryAnalyticSummaryDtoImplToJson(
  _$InventoryAnalyticSummaryDtoImpl instance,
) => <String, dynamic>{
  'total_products': instance.totalProducts,
  'total_ingredients': instance.totalIngredients,
  'total_value': instance.totalValue,
  'low_stock_products': instance.lowStockProducts,
  'low_stock_ingredients': instance.lowStockIngredients,
  'zero_stock_products': instance.zeroStockProducts,
  'zero_stock_ingredients': instance.zeroStockIngredients,
  'total_sold_products': instance.totalSoldProducts,
  'total_sold_ingredients': instance.totalSoldIngredients,
  'outlet_id': instance.outletId,
  'outlet_name': instance.outletName,
  'generated_at': instance.generatedAt?.toIso8601String(),
};

_$InventoryAnalyticProductItemDtoImpl
_$$InventoryAnalyticProductItemDtoImplFromJson(Map<String, dynamic> json) =>
    _$InventoryAnalyticProductItemDtoImpl(
      id: json['id'] as String?,
      productId: json['product_id'] as String?,
      productName: json['product_name'] as String?,
      categoryName: json['category_name'] as String?,
      quantity: (json['quantity'] as num?)?.toInt(),
      reorderLevel: (json['reorder_level'] as num?)?.toInt(),
      unitCost: json['unit_cost'] as num?,
      totalValue: (json['total_value'] as num?)?.toInt(),
      totalIn: (json['total_in'] as num?)?.toInt(),
      totalOut: (json['total_out'] as num?)?.toInt(),
      isLowStock: json['is_low_stock'] as bool?,
      isZeroStock: json['is_zero_stock'] as bool?,
      updatedAt: json['updated_at'] == null
          ? null
          : DateTime.parse(json['updated_at'] as String),
    );

Map<String, dynamic> _$$InventoryAnalyticProductItemDtoImplToJson(
  _$InventoryAnalyticProductItemDtoImpl instance,
) => <String, dynamic>{
  'id': instance.id,
  'product_id': instance.productId,
  'product_name': instance.productName,
  'category_name': instance.categoryName,
  'quantity': instance.quantity,
  'reorder_level': instance.reorderLevel,
  'unit_cost': instance.unitCost,
  'total_value': instance.totalValue,
  'total_in': instance.totalIn,
  'total_out': instance.totalOut,
  'is_low_stock': instance.isLowStock,
  'is_zero_stock': instance.isZeroStock,
  'updated_at': instance.updatedAt?.toIso8601String(),
};

_$InventoryAnalyticIngredientItemDtoImpl
_$$InventoryAnalyticIngredientItemDtoImplFromJson(Map<String, dynamic> json) =>
    _$InventoryAnalyticIngredientItemDtoImpl(
      id: json['id'] as String?,
      ingredientId: json['ingredient_id'] as String?,
      ingredientName: json['ingredient_name'] as String?,
      unitName: json['unit_name'] as String?,
      quantity: (json['quantity'] as num?)?.toInt(),
      reorderLevel: (json['reorder_level'] as num?)?.toInt(),
      unitCost: json['unit_cost'] as num?,
      totalValue: (json['total_value'] as num?)?.toInt(),
      totalIn: (json['total_in'] as num?)?.toInt(),
      totalOut: (json['total_out'] as num?)?.toInt(),
      isLowStock: json['is_low_stock'] as bool?,
      isZeroStock: json['is_zero_stock'] as bool?,
      updatedAt: json['updated_at'] == null
          ? null
          : DateTime.parse(json['updated_at'] as String),
    );

Map<String, dynamic> _$$InventoryAnalyticIngredientItemDtoImplToJson(
  _$InventoryAnalyticIngredientItemDtoImpl instance,
) => <String, dynamic>{
  'id': instance.id,
  'ingredient_id': instance.ingredientId,
  'ingredient_name': instance.ingredientName,
  'unit_name': instance.unitName,
  'quantity': instance.quantity,
  'reorder_level': instance.reorderLevel,
  'unit_cost': instance.unitCost,
  'total_value': instance.totalValue,
  'total_in': instance.totalIn,
  'total_out': instance.totalOut,
  'is_low_stock': instance.isLowStock,
  'is_zero_stock': instance.isZeroStock,
  'updated_at': instance.updatedAt?.toIso8601String(),
};
