// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'flash_sale_detail_response.dart';

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

FlashSaleDetailResponse _$FlashSaleDetailResponseFromJson(
  Map<String, dynamic> json,
) => FlashSaleDetailResponse(
  id: (json['id'] as num?)?.toInt(),
  flashSale:
      json['flash_sale'] == null
          ? null
          : PreviewFlashSale.fromJson(
            json['flash_sale'] as Map<String, dynamic>,
          ),
  products:
      (json['products'] as List<dynamic>?)
          ?.map((e) => ProductModel.fromJson(e as Map<String, dynamic>))
          .toList(),
  name: json['name'] as String?,
  countdownSecond: (json['countdown_second'] as num?)?.toInt(),
  headerImg: json['header_img'] as String?,
  startTime: json['start_time'] as String?,
  endTime: json['end_time'] as String?,
  isReward: json['is_reward'] as bool?,
);

Map<String, dynamic> _$FlashSaleDetailResponseToJson(
  FlashSaleDetailResponse instance,
) => <String, dynamic>{
  'id': instance.id,
  'flash_sale': instance.flashSale,
  'products': instance.products,
  'name': instance.name,
  'countdown_second': instance.countdownSecond,
  'header_img': instance.headerImg,
  'start_time': instance.startTime,
  'end_time': instance.endTime,
  'is_reward': instance.isReward,
};
