2025-08-17 10:10:31 +07:00
|
|
|
// 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?,
|
|
|
|
|
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,
|
|
|
|
|
'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,
|
|
|
|
|
};
|
2025-08-17 22:36:46 +07:00
|
|
|
|
|
|
|
|
_$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
|
|
|
|
|
: 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(),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_$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,
|
|
|
|
|
};
|
2025-08-17 22:46:25 +07:00
|
|
|
|
|
|
|
|
_$CategoryAnalyticDtoImpl _$$CategoryAnalyticDtoImplFromJson(
|
|
|
|
|
Map<String, dynamic> json,
|
|
|
|
|
) => _$CategoryAnalyticDtoImpl(
|
|
|
|
|
organizationId: json['organization_id'] as String?,
|
|
|
|
|
outletId: json['outlet_id'] 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,
|
|
|
|
|
'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,
|
|
|
|
|
};
|
2025-08-17 23:54:28 +07:00
|
|
|
|
|
|
|
|
_$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,
|
|
|
|
|
};
|