// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'analytic_dtos.dart';

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

_$SalesAnalyticDtoImpl _$$SalesAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$SalesAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  outletName: json['outlet_name'] 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
      : SalesAnalyticSummaryDto.fromJson(
          json['summary'] as Map<String, dynamic>,
        ),
  data: (json['data'] as List<dynamic>?)
      ?.map((e) => SalesAnalyticDataDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

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

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

Map<String, dynamic> _$$SalesAnalyticSummaryDtoImplToJson(
  _$SalesAnalyticSummaryDtoImpl 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,
};

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

Map<String, dynamic> _$$SalesAnalyticDataDtoImplToJson(
  _$SalesAnalyticDataDtoImpl 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,
};

_$ProfitLossAnalyticDtoImpl _$$ProfitLossAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  outletName: json['outlet_name'] 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
      : ProfitLossSummaryDto.fromJson(json['summary'] as Map<String, dynamic>),
  data: (json['data'] as List<dynamic>?)
      ?.map((e) => ProfitLossDailyDataDto.fromJson(e as Map<String, dynamic>))
      .toList(),
  productData: (json['product_data'] as List<dynamic>?)
      ?.map((e) => ProfitLossProductDataDto.fromJson(e as Map<String, dynamic>))
      .toList(),
  mainSummary: (json['main_summary'] as List<dynamic>?)
      ?.map(
        (e) => ProfitLossMainSummaryItemDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
  purchasing: json['purchasing'] == null
      ? null
      : ProfitLossPurchasingDto.fromJson(
          json['purchasing'] as Map<String, dynamic>,
        ),
  operationalExpenses: (json['operational_expenses'] as List<dynamic>?)
      ?.map(
        (e) =>
            ProfitLossOperationalExpenseDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
  operationalExpensesTotal: (json['operational_expenses_total'] as num?)
      ?.toInt(),
);

Map<String, dynamic> _$$ProfitLossAnalyticDtoImplToJson(
  _$ProfitLossAnalyticDtoImpl instance,
) => <String, dynamic>{
  'organization_id': instance.organizationId,
  'outlet_id': instance.outletId,
  'outlet_name': instance.outletName,
  'date_from': instance.dateFrom,
  'date_to': instance.dateTo,
  'group_by': instance.groupBy,
  'summary': instance.summary,
  'data': instance.data,
  'product_data': instance.productData,
  'main_summary': instance.mainSummary,
  'purchasing': instance.purchasing,
  'operational_expenses': instance.operationalExpenses,
  'operational_expenses_total': instance.operationalExpensesTotal,
};

_$ProfitLossSummaryDtoImpl _$$ProfitLossSummaryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossSummaryDtoImpl(
  totalRevenue: (json['total_revenue'] as num?)?.toInt(),
  totalCost: (json['total_cost'] as num?)?.toInt(),
  grossProfit: (json['gross_profit'] as num?)?.toInt(),
  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?)?.toInt(),
  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> _$$ProfitLossSummaryDtoImplToJson(
  _$ProfitLossSummaryDtoImpl 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,
};

_$ProfitLossDailyDataDtoImpl _$$ProfitLossDailyDataDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossDailyDataDtoImpl(
  date: json['date'] as String?,
  revenue: (json['revenue'] as num?)?.toInt(),
  cost: (json['cost'] as num?)?.toInt(),
  grossProfit: (json['gross_profit'] as num?)?.toInt(),
  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?)?.toInt(),
  netProfitMargin: (json['net_profit_margin'] as num?)?.toDouble(),
  orders: (json['orders'] as num?)?.toInt(),
);

Map<String, dynamic> _$$ProfitLossDailyDataDtoImplToJson(
  _$ProfitLossDailyDataDtoImpl 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,
};

_$ProfitLossProductDataDtoImpl _$$ProfitLossProductDataDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossProductDataDtoImpl(
  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?)?.toInt(),
  grossProfit: (json['gross_profit'] as num?)?.toInt(),
  grossProfitMargin: (json['gross_profit_margin'] as num?)?.toDouble(),
  averagePrice: (json['average_price'] as num?)?.toInt(),
  averageCost: (json['average_cost'] as num?)?.toInt(),
  profitPerUnit: (json['profit_per_unit'] as num?)?.toInt(),
);

Map<String, dynamic> _$$ProfitLossProductDataDtoImplToJson(
  _$ProfitLossProductDataDtoImpl 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,
};

_$ProfitLossMainSummaryItemDtoImpl _$$ProfitLossMainSummaryItemDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossMainSummaryItemDtoImpl(
  id: json['id'] as String?,
  label: json['label'] as String?,
  isBold: json['is_bold'] as bool?,
  todayNominal: (json['today_nominal'] as num?)?.toInt(),
  todayPct: (json['today_pct'] as num?)?.toDouble(),
  mtdNominal: (json['mtd_nominal'] as num?)?.toInt(),
  mtdPct: (json['mtd_pct'] as num?)?.toDouble(),
  subItems: (json['sub_items'] as List<dynamic>?)
      ?.map(
        (e) => ProfitLossMainSummaryItemDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
);

Map<String, dynamic> _$$ProfitLossMainSummaryItemDtoImplToJson(
  _$ProfitLossMainSummaryItemDtoImpl instance,
) => <String, dynamic>{
  'id': instance.id,
  'label': instance.label,
  'is_bold': instance.isBold,
  'today_nominal': instance.todayNominal,
  'today_pct': instance.todayPct,
  'mtd_nominal': instance.mtdNominal,
  'mtd_pct': instance.mtdPct,
  'sub_items': instance.subItems,
};

_$ProfitLossPurchasingDtoImpl _$$ProfitLossPurchasingDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossPurchasingDtoImpl(
  todayTotal: (json['today_total'] as num?)?.toInt(),
  mtdTotal: (json['mtd_total'] as num?)?.toInt(),
  todayRawMaterial: (json['today_raw_material'] as num?)?.toInt(),
  mtdRawMaterial: (json['mtd_raw_material'] as num?)?.toInt(),
  todayExpense: (json['today_expense'] as num?)?.toInt(),
  mtdExpense: (json['mtd_expense'] as num?)?.toInt(),
  items: (json['items'] as List<dynamic>?)
      ?.map(
        (e) => ProfitLossPurchasingItemDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
);

Map<String, dynamic> _$$ProfitLossPurchasingDtoImplToJson(
  _$ProfitLossPurchasingDtoImpl instance,
) => <String, dynamic>{
  'today_total': instance.todayTotal,
  'mtd_total': instance.mtdTotal,
  'today_raw_material': instance.todayRawMaterial,
  'mtd_raw_material': instance.mtdRawMaterial,
  'today_expense': instance.todayExpense,
  'mtd_expense': instance.mtdExpense,
  'items': instance.items,
};

_$ProfitLossPurchasingItemDtoImpl _$$ProfitLossPurchasingItemDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitLossPurchasingItemDtoImpl(
  date: json['date'] as String?,
  item: json['item'] as String?,
  quantity: (json['quantity'] as num?)?.toInt(),
  nominal: (json['nominal'] as num?)?.toInt(),
);

Map<String, dynamic> _$$ProfitLossPurchasingItemDtoImplToJson(
  _$ProfitLossPurchasingItemDtoImpl instance,
) => <String, dynamic>{
  'date': instance.date,
  'item': instance.item,
  'quantity': instance.quantity,
  'nominal': instance.nominal,
};

_$ProfitLossOperationalExpenseDtoImpl
_$$ProfitLossOperationalExpenseDtoImplFromJson(Map<String, dynamic> json) =>
    _$ProfitLossOperationalExpenseDtoImpl(
      item: json['item'] as String?,
      nominal: (json['nominal'] as num?)?.toInt(),
    );

Map<String, dynamic> _$$ProfitLossOperationalExpenseDtoImplToJson(
  _$ProfitLossOperationalExpenseDtoImpl instance,
) => <String, dynamic>{'item': instance.item, 'nominal': instance.nominal};

_$CategoryAnalyticDtoImpl _$$CategoryAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$CategoryAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  outletName: json['outlet_name'] as String?,
  dateFrom: json['date_from'] as String?,
  dateTo: 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,
  'outlet_name': instance.outletName,
  'date_from': instance.dateFrom,
  'date_to': instance.dateTo,
  '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
      : InventorySummaryDto.fromJson(json['summary'] as Map<String, dynamic>),
  products: (json['products'] as List<dynamic>?)
      ?.map((e) => InventoryProductDto.fromJson(e as Map<String, dynamic>))
      .toList(),
  ingredients: (json['ingredients'] as List<dynamic>?)
      ?.map((e) => InventoryIngredientDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

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

_$InventorySummaryDtoImpl _$$InventorySummaryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$InventorySummaryDtoImpl(
  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'] as String?,
);

Map<String, dynamic> _$$InventorySummaryDtoImplToJson(
  _$InventorySummaryDtoImpl 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,
};

_$InventoryProductDtoImpl _$$InventoryProductDtoImplFromJson(
  Map<String, dynamic> json,
) => _$InventoryProductDtoImpl(
  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?)?.toInt(),
  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'] as String?,
);

Map<String, dynamic> _$$InventoryProductDtoImplToJson(
  _$InventoryProductDtoImpl 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,
};

_$InventoryIngredientDtoImpl _$$InventoryIngredientDtoImplFromJson(
  Map<String, dynamic> json,
) => _$InventoryIngredientDtoImpl(
  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?)?.toInt(),
  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'] as String?,
);

Map<String, dynamic> _$$InventoryIngredientDtoImplToJson(
  _$InventoryIngredientDtoImpl 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,
};

_$DashboardAnalyticDtoImpl _$$DashboardAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$DashboardAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  outletName: json['outlet_name'] 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,
  'outlet_name': instance.outletName,
  '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(),
  totalItemSold: (json['total_item_sold'] as num?)?.toInt(),
  totalLowStock: (json['total_low_stock'] as num?)?.toInt(),
  totalProductActive: (json['total_product_active'] 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,
  'total_item_sold': instance.totalItemSold,
  'total_low_stock': instance.totalLowStock,
  'total_product_active': instance.totalProductActive,
};

_$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,
};

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

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

_$ProductAnalyticDataDtoImpl _$$ProductAnalyticDataDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProductAnalyticDataDtoImpl(
  productId: json['product_id'] as String?,
  productName: json['product_name'] as String?,
  productSku: json['product_sku'] as String?,
  productPrice: (json['product_price'] as num?)?.toInt(),
  categoryId: json['category_id'] as String?,
  categoryName: json['category_name'] as String?,
  categoryOrder: (json['category_order'] as num?)?.toInt(),
  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(),
  standardHppPerUnit: (json['standard_hpp_per_unit'] as num?)?.toInt(),
  standardHppTotal: (json['standard_hpp_total'] as num?)?.toInt(),
  fifoHppPerUnit: (json['fifo_hpp_per_unit'] as num?)?.toInt(),
  fifoHppTotal: (json['fifo_hpp_total'] as num?)?.toInt(),
  movingAverageHppPerUnit: (json['moving_average_hpp_per_unit'] as num?)
      ?.toInt(),
  movingAverageHppTotal: (json['moving_average_hpp_total'] as num?)?.toInt(),
);

Map<String, dynamic> _$$ProductAnalyticDataDtoImplToJson(
  _$ProductAnalyticDataDtoImpl instance,
) => <String, dynamic>{
  'product_id': instance.productId,
  'product_name': instance.productName,
  'product_sku': instance.productSku,
  'product_price': instance.productPrice,
  'category_id': instance.categoryId,
  'category_name': instance.categoryName,
  'category_order': instance.categoryOrder,
  'quantity_sold': instance.quantitySold,
  'revenue': instance.revenue,
  'average_price': instance.averagePrice,
  'order_count': instance.orderCount,
  'standard_hpp_per_unit': instance.standardHppPerUnit,
  'standard_hpp_total': instance.standardHppTotal,
  'fifo_hpp_per_unit': instance.fifoHppPerUnit,
  'fifo_hpp_total': instance.fifoHppTotal,
  'moving_average_hpp_per_unit': instance.movingAverageHppPerUnit,
  'moving_average_hpp_total': instance.movingAverageHppTotal,
};

_$PaymentMethodAnalyticDtoImpl _$$PaymentMethodAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PaymentMethodAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  outletName: json['outlet_name'] 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
      : PaymentMethodSummaryDto.fromJson(
          json['summary'] as Map<String, dynamic>,
        ),
  data: (json['data'] as List<dynamic>?)
      ?.map((e) => PaymentMethodItemDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

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

_$PaymentMethodItemDtoImpl _$$PaymentMethodItemDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PaymentMethodItemDtoImpl(
  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?,
  orderCount: (json['order_count'] as num?)?.toInt(),
  paymentCount: (json['payment_count'] as num?)?.toInt(),
  percentage: (json['percentage'] as num?)?.toDouble(),
);

Map<String, dynamic> _$$PaymentMethodItemDtoImplToJson(
  _$PaymentMethodItemDtoImpl 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,
};

_$PaymentMethodSummaryDtoImpl _$$PaymentMethodSummaryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PaymentMethodSummaryDtoImpl(
  totalAmount: json['total_amount'] as num?,
  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> _$$PaymentMethodSummaryDtoImplToJson(
  _$PaymentMethodSummaryDtoImpl instance,
) => <String, dynamic>{
  'total_amount': instance.totalAmount,
  'total_orders': instance.totalOrders,
  'total_payments': instance.totalPayments,
  'average_order_value': instance.averageOrderValue,
};

_$PurchasingAnalyticDtoImpl _$$PurchasingAnalyticDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PurchasingAnalyticDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  outletName: json['outlet_name'] 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
      : PurchasingAnalyticSummaryDto.fromJson(
          json['summary'] as Map<String, dynamic>,
        ),
  data: (json['data'] as List<dynamic>?)
      ?.map(
        (e) => PurchasingAnalyticDataDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
  ingredientData: (json['ingredient_data'] as List<dynamic>?)
      ?.map(
        (e) => PurchasingIngredientDataDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
  vendorData: (json['vendor_data'] as List<dynamic>?)
      ?.map((e) => PurchasingVendorDataDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

Map<String, dynamic> _$$PurchasingAnalyticDtoImplToJson(
  _$PurchasingAnalyticDtoImpl instance,
) => <String, dynamic>{
  'organization_id': instance.organizationId,
  'outlet_id': instance.outletId,
  'outlet_name': instance.outletName,
  'date_from': instance.dateFrom?.toIso8601String(),
  'date_to': instance.dateTo?.toIso8601String(),
  'group_by': instance.groupBy,
  'summary': instance.summary,
  'data': instance.data,
  'ingredient_data': instance.ingredientData,
  'vendor_data': instance.vendorData,
};

_$PurchasingAnalyticSummaryDtoImpl _$$PurchasingAnalyticSummaryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PurchasingAnalyticSummaryDtoImpl(
  totalPurchases: json['total_purchases'] as num?,
  rawMaterialPurchases: json['raw_material_purchases'] as num?,
  expensePurchases: json['expense_purchases'] as num?,
  totalPurchaseOrders: json['total_purchase_orders'] as num?,
  rawMaterialPurchaseOrders: json['raw_material_purchase_orders'] as num?,
  expenseCount: json['expense_count'] as num?,
  totalQuantity: json['total_quantity'] as num?,
  averagePurchaseOrderValue: json['average_purchase_order_value'] as num?,
  totalIngredients: json['total_ingredients'] as num?,
  totalVendors: json['total_vendors'] as num?,
);

Map<String, dynamic> _$$PurchasingAnalyticSummaryDtoImplToJson(
  _$PurchasingAnalyticSummaryDtoImpl instance,
) => <String, dynamic>{
  'total_purchases': instance.totalPurchases,
  'raw_material_purchases': instance.rawMaterialPurchases,
  'expense_purchases': instance.expensePurchases,
  'total_purchase_orders': instance.totalPurchaseOrders,
  'raw_material_purchase_orders': instance.rawMaterialPurchaseOrders,
  'expense_count': instance.expenseCount,
  'total_quantity': instance.totalQuantity,
  'average_purchase_order_value': instance.averagePurchaseOrderValue,
  'total_ingredients': instance.totalIngredients,
  'total_vendors': instance.totalVendors,
};

_$PurchasingAnalyticDataDtoImpl _$$PurchasingAnalyticDataDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PurchasingAnalyticDataDtoImpl(
  date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
  purchases: json['purchases'] as num?,
  rawMaterialPurchases: json['raw_material_purchases'] as num?,
  expensePurchases: json['expense_purchases'] as num?,
  purchaseOrders: json['purchase_orders'] as num?,
  rawMaterialPurchaseOrders: json['raw_material_purchase_orders'] as num?,
  expenseCount: json['expense_count'] as num?,
  quantity: json['quantity'] as num?,
  ingredients: json['ingredients'] as num?,
  vendors: json['vendors'] as num?,
);

Map<String, dynamic> _$$PurchasingAnalyticDataDtoImplToJson(
  _$PurchasingAnalyticDataDtoImpl instance,
) => <String, dynamic>{
  'date': instance.date?.toIso8601String(),
  'purchases': instance.purchases,
  'raw_material_purchases': instance.rawMaterialPurchases,
  'expense_purchases': instance.expensePurchases,
  'purchase_orders': instance.purchaseOrders,
  'raw_material_purchase_orders': instance.rawMaterialPurchaseOrders,
  'expense_count': instance.expenseCount,
  'quantity': instance.quantity,
  'ingredients': instance.ingredients,
  'vendors': instance.vendors,
};

_$PurchasingIngredientDataDtoImpl _$$PurchasingIngredientDataDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PurchasingIngredientDataDtoImpl(
  ingredientId: json['ingredient_id'] as String?,
  ingredientName: json['ingredient_name'] as String?,
  quantity: json['quantity'] as num?,
  totalCost: json['total_cost'] as num?,
  averageUnitCost: json['average_unit_cost'] as num?,
  purchaseOrderCount: json['purchase_order_count'] as num?,
);

Map<String, dynamic> _$$PurchasingIngredientDataDtoImplToJson(
  _$PurchasingIngredientDataDtoImpl instance,
) => <String, dynamic>{
  'ingredient_id': instance.ingredientId,
  'ingredient_name': instance.ingredientName,
  'quantity': instance.quantity,
  'total_cost': instance.totalCost,
  'average_unit_cost': instance.averageUnitCost,
  'purchase_order_count': instance.purchaseOrderCount,
};

_$PurchasingVendorDataDtoImpl _$$PurchasingVendorDataDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PurchasingVendorDataDtoImpl(
  vendorId: json['vendor_id'] as String?,
  vendorName: json['vendor_name'] as String?,
  totalCost: json['total_cost'] as num?,
  purchaseOrderCount: json['purchase_order_count'] as num?,
  ingredientCount: json['ingredient_count'] as num?,
  quantity: json['quantity'] as num?,
);

Map<String, dynamic> _$$PurchasingVendorDataDtoImplToJson(
  _$PurchasingVendorDataDtoImpl instance,
) => <String, dynamic>{
  'vendor_id': instance.vendorId,
  'vendor_name': instance.vendorName,
  'total_cost': instance.totalCost,
  'purchase_order_count': instance.purchaseOrderCount,
  'ingredient_count': instance.ingredientCount,
  'quantity': instance.quantity,
};

_$ExclusiveSummaryDtoImpl _$$ExclusiveSummaryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ExclusiveSummaryDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  outletName: json['outlet_name'] as String?,
  period: json['period'] == null
      ? null
      : ExclusiveSummaryPeriodDto.fromJson(
          json['period'] as Map<String, dynamic>,
        ),
  summary: json['summary'] == null
      ? null
      : ExclusiveSummarySummaryDto.fromJson(
          json['summary'] as Map<String, dynamic>,
        ),
  reimburse: json['reimburse'] == null
      ? null
      : ExclusiveSummaryReimburseDto.fromJson(
          json['reimburse'] as Map<String, dynamic>,
        ),
  hppBreakdown: (json['hpp_breakdown'] as List<dynamic>?)
      ?.map(
        (e) => ExclusiveSummaryBreakdownDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
  operationalExpenseBreakdown:
      (json['operational_expense_breakdown'] as List<dynamic>?)
          ?.map(
            (e) => ExclusiveSummaryBreakdownDto.fromJson(
              e as Map<String, dynamic>,
            ),
          )
          .toList(),
  dailySummary: (json['daily_summary'] as List<dynamic>?)
      ?.map((e) => ExclusiveSummaryDailyDto.fromJson(e as Map<String, dynamic>))
      .toList(),
  dailyTransactions: (json['daily_transactions'] as List<dynamic>?)
      ?.map(
        (e) =>
            ExclusiveSummaryTransactionDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
);

Map<String, dynamic> _$$ExclusiveSummaryDtoImplToJson(
  _$ExclusiveSummaryDtoImpl instance,
) => <String, dynamic>{
  'organization_id': instance.organizationId,
  'outlet_id': instance.outletId,
  'outlet_name': instance.outletName,
  'period': instance.period,
  'summary': instance.summary,
  'reimburse': instance.reimburse,
  'hpp_breakdown': instance.hppBreakdown,
  'operational_expense_breakdown': instance.operationalExpenseBreakdown,
  'daily_summary': instance.dailySummary,
  'daily_transactions': instance.dailyTransactions,
};

_$ExclusiveSummaryPeriodDtoImpl _$$ExclusiveSummaryPeriodDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ExclusiveSummaryPeriodDtoImpl(
  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),
);

Map<String, dynamic> _$$ExclusiveSummaryPeriodDtoImplToJson(
  _$ExclusiveSummaryPeriodDtoImpl instance,
) => <String, dynamic>{
  'date_from': instance.dateFrom?.toIso8601String(),
  'date_to': instance.dateTo?.toIso8601String(),
};

_$ExclusiveSummarySummaryDtoImpl _$$ExclusiveSummarySummaryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ExclusiveSummarySummaryDtoImpl(
  sales: json['sales'] as num?,
  hpp: json['hpp'] as num?,
  grossProfit: json['gross_profit'] as num?,
  salaryTotal: json['salary_total'] as num?,
  salaryDw: json['salary_dw'] as num?,
  salaryStaff: json['salary_staff'] as num?,
  salaryOther: json['salary_other'] as num?,
  otherOperationalExpenses: json['other_operational_expenses'] as num?,
  operationalExpensesTotal: json['operational_expenses_total'] as num?,
  totalCost: json['total_cost'] as num?,
  netProfit: json['net_profit'] as num?,
);

Map<String, dynamic> _$$ExclusiveSummarySummaryDtoImplToJson(
  _$ExclusiveSummarySummaryDtoImpl instance,
) => <String, dynamic>{
  'sales': instance.sales,
  'hpp': instance.hpp,
  'gross_profit': instance.grossProfit,
  'salary_total': instance.salaryTotal,
  'salary_dw': instance.salaryDw,
  'salary_staff': instance.salaryStaff,
  'salary_other': instance.salaryOther,
  'other_operational_expenses': instance.otherOperationalExpenses,
  'operational_expenses_total': instance.operationalExpensesTotal,
  'total_cost': instance.totalCost,
  'net_profit': instance.netProfit,
};

_$ExclusiveSummaryReimburseDtoImpl _$$ExclusiveSummaryReimburseDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ExclusiveSummaryReimburseDtoImpl(
  totalCost: json['total_cost'] as num?,
  excludedSalaryStaff: json['excluded_salary_staff'] as num?,
  totalReimburse: json['total_reimburse'] as num?,
);

Map<String, dynamic> _$$ExclusiveSummaryReimburseDtoImplToJson(
  _$ExclusiveSummaryReimburseDtoImpl instance,
) => <String, dynamic>{
  'total_cost': instance.totalCost,
  'excluded_salary_staff': instance.excludedSalaryStaff,
  'total_reimburse': instance.totalReimburse,
};

_$ExclusiveSummaryBreakdownDtoImpl _$$ExclusiveSummaryBreakdownDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ExclusiveSummaryBreakdownDtoImpl(
  categoryCode: json['category_code'] as String?,
  categoryName: json['category_name'] as String?,
  amount: json['amount'] as num?,
  percentage: json['percentage'] as num?,
);

Map<String, dynamic> _$$ExclusiveSummaryBreakdownDtoImplToJson(
  _$ExclusiveSummaryBreakdownDtoImpl instance,
) => <String, dynamic>{
  'category_code': instance.categoryCode,
  'category_name': instance.categoryName,
  'amount': instance.amount,
  'percentage': instance.percentage,
};

_$ExclusiveSummaryDailyDtoImpl _$$ExclusiveSummaryDailyDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ExclusiveSummaryDailyDtoImpl(
  date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
  transactionCount: json['transaction_count'] as num?,
  totalCost: json['total_cost'] as num?,
);

Map<String, dynamic> _$$ExclusiveSummaryDailyDtoImplToJson(
  _$ExclusiveSummaryDailyDtoImpl instance,
) => <String, dynamic>{
  'date': instance.date?.toIso8601String(),
  'transaction_count': instance.transactionCount,
  'total_cost': instance.totalCost,
};

_$ExclusiveSummaryTransactionDtoImpl
_$$ExclusiveSummaryTransactionDtoImplFromJson(Map<String, dynamic> json) =>
    _$ExclusiveSummaryTransactionDtoImpl(
      date: json['date'] == null
          ? null
          : DateTime.parse(json['date'] as String),
      categoryCode: json['category_code'] as String?,
      categoryName: json['category_name'] as String?,
      description: json['description'] as String?,
      amount: json['amount'] as num?,
      source: json['source'] as String?,
    );

Map<String, dynamic> _$$ExclusiveSummaryTransactionDtoImplToJson(
  _$ExclusiveSummaryTransactionDtoImpl instance,
) => <String, dynamic>{
  'date': instance.date?.toIso8601String(),
  'category_code': instance.categoryCode,
  'category_name': instance.categoryName,
  'description': instance.description,
  'amount': instance.amount,
  'source': instance.source,
};

_$ProfitSharingDtoImpl _$$ProfitSharingDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitSharingDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  outletName: json['outlet_name'] 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) => ProfitSharingCategoryDto.fromJson(e as Map<String, dynamic>))
      .toList(),
  budget: json['budget'] == null
      ? null
      : ProfitSharingBudgetDto.fromJson(json['budget'] as Map<String, dynamic>),
);

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

_$ProfitSharingCategoryDtoImpl _$$ProfitSharingCategoryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitSharingCategoryDtoImpl(
  parentCategoryId: json['parent_category_id'] as String?,
  parentCategoryName: json['parent_category_name'] as String?,
  totalRevenue: json['total_revenue'] as num?,
  totalQuantity: json['total_quantity'] as num?,
  categoryCount: json['category_count'] as num?,
  productCount: json['product_count'] as num?,
  orderCount: json['order_count'] as num?,
  totalStandardHpp: json['total_standard_hpp'] as num?,
  totalFifoHpp: json['total_fifo_hpp'] as num?,
  totalMovingAverageHpp: json['total_moving_average_hpp'] as num?,
);

Map<String, dynamic> _$$ProfitSharingCategoryDtoImplToJson(
  _$ProfitSharingCategoryDtoImpl instance,
) => <String, dynamic>{
  'parent_category_id': instance.parentCategoryId,
  'parent_category_name': instance.parentCategoryName,
  'total_revenue': instance.totalRevenue,
  'total_quantity': instance.totalQuantity,
  'category_count': instance.categoryCount,
  'product_count': instance.productCount,
  'order_count': instance.orderCount,
  'total_standard_hpp': instance.totalStandardHpp,
  'total_fifo_hpp': instance.totalFifoHpp,
  'total_moving_average_hpp': instance.totalMovingAverageHpp,
};

_$ProfitSharingBudgetDtoImpl _$$ProfitSharingBudgetDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitSharingBudgetDtoImpl(
  percentages: json['percentages'] == null
      ? null
      : ProfitSharingPercentageDto.fromJson(
          json['percentages'] as Map<String, dynamic>,
        ),
  cutOffFrom: json['cut_off_from'] == null
      ? null
      : DateTime.parse(json['cut_off_from'] as String),
  cutOffTo: json['cut_off_to'] == null
      ? null
      : DateTime.parse(json['cut_off_to'] as String),
  total: json['total'] == null
      ? null
      : ProfitSharingPeriodDto.fromJson(json['total'] as Map<String, dynamic>),
  weekly: (json['weekly'] as List<dynamic>?)
      ?.map((e) => ProfitSharingPeriodDto.fromJson(e as Map<String, dynamic>))
      .toList(),
  monthly: (json['monthly'] as List<dynamic>?)
      ?.map((e) => ProfitSharingPeriodDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

Map<String, dynamic> _$$ProfitSharingBudgetDtoImplToJson(
  _$ProfitSharingBudgetDtoImpl instance,
) => <String, dynamic>{
  'percentages': instance.percentages,
  'cut_off_from': instance.cutOffFrom?.toIso8601String(),
  'cut_off_to': instance.cutOffTo?.toIso8601String(),
  'total': instance.total,
  'weekly': instance.weekly,
  'monthly': instance.monthly,
};

_$ProfitSharingPercentageDtoImpl _$$ProfitSharingPercentageDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitSharingPercentageDtoImpl(
  purchase: json['purchase'] as num?,
  owner: json['owner'] as num?,
  team: json['team'] as num?,
);

Map<String, dynamic> _$$ProfitSharingPercentageDtoImplToJson(
  _$ProfitSharingPercentageDtoImpl instance,
) => <String, dynamic>{
  'purchase': instance.purchase,
  'owner': instance.owner,
  'team': instance.team,
};

_$ProfitSharingPeriodDtoImpl _$$ProfitSharingPeriodDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitSharingPeriodDtoImpl(
  periodStart: json['period_start'] == null
      ? null
      : DateTime.parse(json['period_start'] as String),
  periodEnd: json['period_end'] == null
      ? null
      : DateTime.parse(json['period_end'] as String),
  revenue: json['revenue'] as num?,
  orderCount: json['order_count'] as num?,
  limitPurchase: json['limit_purchase'] as num?,
  limitOwner: json['limit_owner'] as num?,
  limitTeam: json['limit_team'] as num?,
  month: json['month'] as String?,
  weekCount: json['week_count'] as num?,
);

Map<String, dynamic> _$$ProfitSharingPeriodDtoImplToJson(
  _$ProfitSharingPeriodDtoImpl instance,
) => <String, dynamic>{
  'period_start': instance.periodStart?.toIso8601String(),
  'period_end': instance.periodEnd?.toIso8601String(),
  'revenue': instance.revenue,
  'order_count': instance.orderCount,
  'limit_purchase': instance.limitPurchase,
  'limit_owner': instance.limitOwner,
  'limit_team': instance.limitTeam,
  'month': instance.month,
  'week_count': instance.weekCount,
};

_$ProfitSharingDetailDtoImpl _$$ProfitSharingDetailDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitSharingDetailDtoImpl(
  organizationId: json['organization_id'] as String?,
  outletId: json['outlet_id'] as String?,
  outletName: json['outlet_name'] 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),
  parentCategoryId: json['parent_category_id'] as String?,
  parentCategoryName: json['parent_category_name'] as String?,
  summary: json['summary'] == null
      ? null
      : ProfitSharingSummaryDto.fromJson(
          json['summary'] as Map<String, dynamic>,
        ),
  categories: (json['categories'] as List<dynamic>?)
      ?.map(
        (e) => ProfitSharingSubCategoryDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
  budget: json['budget'] == null
      ? null
      : ProfitSharingBudgetDto.fromJson(json['budget'] as Map<String, dynamic>),
);

Map<String, dynamic> _$$ProfitSharingDetailDtoImplToJson(
  _$ProfitSharingDetailDtoImpl instance,
) => <String, dynamic>{
  'organization_id': instance.organizationId,
  'outlet_id': instance.outletId,
  'outlet_name': instance.outletName,
  'date_from': instance.dateFrom?.toIso8601String(),
  'date_to': instance.dateTo?.toIso8601String(),
  'parent_category_id': instance.parentCategoryId,
  'parent_category_name': instance.parentCategoryName,
  'summary': instance.summary,
  'categories': instance.categories,
  'budget': instance.budget,
};

_$ProfitSharingSummaryDtoImpl _$$ProfitSharingSummaryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitSharingSummaryDtoImpl(
  totalRevenue: json['total_revenue'] as num?,
  totalQuantity: json['total_quantity'] as num?,
  categoryCount: json['category_count'] as num?,
  productCount: json['product_count'] as num?,
  orderCount: json['order_count'] as num?,
  totalStandardHpp: json['total_standard_hpp'] as num?,
  totalFifoHpp: json['total_fifo_hpp'] as num?,
  totalMovingAverageHpp: json['total_moving_average_hpp'] as num?,
);

Map<String, dynamic> _$$ProfitSharingSummaryDtoImplToJson(
  _$ProfitSharingSummaryDtoImpl instance,
) => <String, dynamic>{
  'total_revenue': instance.totalRevenue,
  'total_quantity': instance.totalQuantity,
  'category_count': instance.categoryCount,
  'product_count': instance.productCount,
  'order_count': instance.orderCount,
  'total_standard_hpp': instance.totalStandardHpp,
  'total_fifo_hpp': instance.totalFifoHpp,
  'total_moving_average_hpp': instance.totalMovingAverageHpp,
};

_$ProfitSharingSubCategoryDtoImpl _$$ProfitSharingSubCategoryDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitSharingSubCategoryDtoImpl(
  categoryId: json['category_id'] as String?,
  categoryName: json['category_name'] as String?,
  totalRevenue: json['total_revenue'] as num?,
  totalQuantity: json['total_quantity'] as num?,
  productCount: json['product_count'] as num?,
  orderCount: json['order_count'] as num?,
  totalStandardHpp: json['total_standard_hpp'] as num?,
  totalFifoHpp: json['total_fifo_hpp'] as num?,
  totalMovingAverageHpp: json['total_moving_average_hpp'] as num?,
  products: (json['products'] as List<dynamic>?)
      ?.map((e) => ProfitSharingProductDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

Map<String, dynamic> _$$ProfitSharingSubCategoryDtoImplToJson(
  _$ProfitSharingSubCategoryDtoImpl 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,
  'total_standard_hpp': instance.totalStandardHpp,
  'total_fifo_hpp': instance.totalFifoHpp,
  'total_moving_average_hpp': instance.totalMovingAverageHpp,
  'products': instance.products,
};

_$ProfitSharingProductDtoImpl _$$ProfitSharingProductDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProfitSharingProductDtoImpl(
  productId: json['product_id'] as String?,
  productName: json['product_name'] as String?,
  productSku: json['product_sku'] as String?,
  productPrice: json['product_price'] as num?,
  quantitySold: json['quantity_sold'] as num?,
  revenue: json['revenue'] as num?,
  averagePrice: json['average_price'] as num?,
  orderCount: json['order_count'] as num?,
  standardHppPerUnit: json['standard_hpp_per_unit'] as num?,
  standardHppTotal: json['standard_hpp_total'] as num?,
  fifoHppPerUnit: json['fifo_hpp_per_unit'] as num?,
  fifoHppTotal: json['fifo_hpp_total'] as num?,
  movingAverageHppPerUnit: json['moving_average_hpp_per_unit'] as num?,
  movingAverageHppTotal: json['moving_average_hpp_total'] as num?,
);

Map<String, dynamic> _$$ProfitSharingProductDtoImplToJson(
  _$ProfitSharingProductDtoImpl instance,
) => <String, dynamic>{
  'product_id': instance.productId,
  'product_name': instance.productName,
  'product_sku': instance.productSku,
  'product_price': instance.productPrice,
  'quantity_sold': instance.quantitySold,
  'revenue': instance.revenue,
  'average_price': instance.averagePrice,
  'order_count': instance.orderCount,
  'standard_hpp_per_unit': instance.standardHppPerUnit,
  'standard_hpp_total': instance.standardHppTotal,
  'fifo_hpp_per_unit': instance.fifoHppPerUnit,
  'fifo_hpp_total': instance.fifoHppTotal,
  'moving_average_hpp_per_unit': instance.movingAverageHppPerUnit,
  'moving_average_hpp_total': instance.movingAverageHppTotal,
};
