// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'product_dtos.dart';

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

_$ListProductDtoImpl _$$ListProductDtoImplFromJson(Map<String, dynamic> json) =>
    _$ListProductDtoImpl(
      products: (json['products'] as List<dynamic>)
          .map((e) => ProductDto.fromJson(e as Map<String, dynamic>))
          .toList(),
      totalCount: (json['total_count'] as num).toInt(),
      page: (json['page'] as num).toInt(),
      limit: (json['limit'] as num).toInt(),
      totalPages: (json['total_pages'] as num).toInt(),
    );

Map<String, dynamic> _$$ListProductDtoImplToJson(
  _$ListProductDtoImpl instance,
) => <String, dynamic>{
  'products': instance.products,
  'total_count': instance.totalCount,
  'page': instance.page,
  'limit': instance.limit,
  'total_pages': instance.totalPages,
};

_$ProductDtoImpl _$$ProductDtoImplFromJson(Map<String, dynamic> json) =>
    _$ProductDtoImpl(
      id: json['id'] as String?,
      organizationId: json['organization_id'] as String?,
      categoryId: json['category_id'] as String?,
      sku: json['sku'] as String?,
      name: json['name'] as String?,
      description: json['description'] as String?,
      price: (json['price'] as num?)?.toDouble(),
      cost: (json['cost'] as num?)?.toDouble(),
      businessType: json['business_type'] as String?,
      imageUrl: json['image_url'] as String?,
      printerType: json['printer_type'] as String?,
      printToChecker: json['print_to_checker'] as bool?,
      metadata: json['metadata'] as Map<String, dynamic>?,
      isActive: json['is_active'] as bool?,
      createdAt: json['created_at'] as String?,
      updatedAt: json['updated_at'] as String?,
      variants: (json['variants'] as List<dynamic>?)
          ?.map((e) => ProductVariantDto.fromJson(e as Map<String, dynamic>))
          .toList(),
    );

Map<String, dynamic> _$$ProductDtoImplToJson(_$ProductDtoImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'organization_id': instance.organizationId,
      'category_id': instance.categoryId,
      'sku': instance.sku,
      'name': instance.name,
      'description': instance.description,
      'price': instance.price,
      'cost': instance.cost,
      'business_type': instance.businessType,
      'image_url': instance.imageUrl,
      'printer_type': instance.printerType,
      'print_to_checker': instance.printToChecker,
      'metadata': instance.metadata,
      'is_active': instance.isActive,
      'created_at': instance.createdAt,
      'updated_at': instance.updatedAt,
      'variants': instance.variants,
    };

_$ProductVariantDtoImpl _$$ProductVariantDtoImplFromJson(
  Map<String, dynamic> json,
) => _$ProductVariantDtoImpl(
  id: json['id'] as String?,
  productId: json['product_id'] as String?,
  name: json['name'] as String?,
  priceModifier: (json['price_modifier'] as num?)?.toDouble(),
  cost: (json['cost'] as num?)?.toDouble(),
  metadata: json['metadata'] as Map<String, dynamic>?,
  createdAt: json['created_at'] as String?,
  updatedAt: json['updated_at'] as String?,
);

Map<String, dynamic> _$$ProductVariantDtoImplToJson(
  _$ProductVariantDtoImpl instance,
) => <String, dynamic>{
  'id': instance.id,
  'product_id': instance.productId,
  'name': instance.name,
  'price_modifier': instance.priceModifier,
  'cost': instance.cost,
  'metadata': instance.metadata,
  'created_at': instance.createdAt,
  'updated_at': instance.updatedAt,
};
