// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'segmentation_model.dart';

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

_SegmentationModel _$SegmentationModelFromJson(Map<String, dynamic> json) =>
    _SegmentationModel(
      key: json['key'] as String?,
      productKey: json['product_key'] as String?,
      guildKey: json['guild_key'] as String?,
      result: json['result'] as String?,
      quota: json['quota'] as String?,
      saleType: json['sale_type'] as String?,
      weight: (json['weight'] as num?)?.toInt(),
      buyer: json['buyer'] == null
          ? null
          : Buyer.fromJson(json['buyer'] as Map<String, dynamic>),
      date: json['date'] == null
          ? null
          : DateTime.parse(json['date'] as String),
      toGuild: json['to_guild'] == null
          ? null
          : ToGuild.fromJson(json['to_guild'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
    <String, dynamic>{
      'key': instance.key,
      'product_key': instance.productKey,
      'guild_key': instance.guildKey,
      'result': instance.result,
      'quota': instance.quota,
      'sale_type': instance.saleType,
      'weight': instance.weight,
      'buyer': instance.buyer,
      'date': instance.date?.toIso8601String(),
      'to_guild': instance.toGuild,
    };

_Buyer _$BuyerFromJson(Map<String, dynamic> json) => _Buyer(
  fullname: json['fullname'] as String?,
  mobile: json['mobile'] as String?,
  shop: json['shop'] as String?,
);

Map<String, dynamic> _$BuyerToJson(_Buyer instance) => <String, dynamic>{
  'fullname': instance.fullname,
  'mobile': instance.mobile,
  'shop': instance.shop,
};

_ToGuild _$ToGuildFromJson(Map<String, dynamic> json) => _ToGuild(
  key: json['key'] as String?,
  guildsName: json['guilds_name'] as String?,
  typeActivity: json['type_activity'] as String?,
  areaActivity: json['area_activity'] as String?,
  guildsId: json['guilds_id'] as String?,
  steward: json['steward'] as bool?,
  user: json['user'] == null
      ? null
      : User.fromJson(json['user'] as Map<String, dynamic>),
);

Map<String, dynamic> _$ToGuildToJson(_ToGuild instance) => <String, dynamic>{
  'key': instance.key,
  'guilds_name': instance.guildsName,
  'type_activity': instance.typeActivity,
  'area_activity': instance.areaActivity,
  'guilds_id': instance.guildsId,
  'steward': instance.steward,
  'user': instance.user,
};

_User _$UserFromJson(Map<String, dynamic> json) => _User(
  fullname: json['fullname'] as String?,
  firstName: json['first_name'] as String?,
  lastName: json['last_name'] as String?,
  mobile: json['mobile'] as String?,
  nationalId: json['national_id'] as String?,
  city: json['city'] as String?,
);

Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
  'fullname': instance.fullname,
  'first_name': instance.firstName,
  'last_name': instance.lastName,
  'mobile': instance.mobile,
  'national_id': instance.nationalId,
  'city': instance.city,
};
