// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'user_subscription.model.dart';

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

UserSubscription _$UserSubscriptionFromJson(Map<String, dynamic> json) {
  return UserSubscription()
    ..id = json['id'] as int
    ..pricing_id = json['pricing_id'] as int
    ..user_id = json['user_id'] as int
    ..role_id = json['role_id'] as int
    ..start_date = json['start_date'] == null
        ? null
        : DateTime.parse(json['start_date'] as String)
    ..end_date = json['end_date'] == null
        ? null
        : DateTime.parse(json['end_date'] as String)
    ..price = (json['price'] as num)?.toDouble()
    ..wod_counter = json['wod_counter'] as int
    ..open_counter = json['open_counter'] as int
    ..total_counter = json['total_counter'] as int
    ..stripe_id = json['stripe_id'] as String
    ..renew = json['renew'] as bool
    ..created_at = json['created_at'] == null
        ? null
        : DateTime.parse(json['created_at'] as String)
    ..updated_at = json['updated_at'] == null
        ? null
        : DateTime.parse(json['updated_at'] as String)
    ..ends_at = json['ends_at'] == null
        ? null
        : DateTime.parse(json['ends_at'] as String)
    ..active = json['active'] as int
    ..company_id = json['company_id'] as int
    ..box_ids = (json['box_ids'] as List)?.map((e) => e as int)?.toList()
    ..pricing = json['pricing'] == null
        ? null
        : Pricing.fromJson(json['pricing'] as Map<String, dynamic>)
    ..role = json['role'] == null
        ? null
        : Role.fromJson(json['role'] as Map<String, dynamic>)
    ..company = json['company'] == null
        ? null
        : Company.fromJson(json['company'] as Map<String, dynamic>)
    ..user = json['user'] == null
        ? null
        : User.fromJson(json['user'] as Map<String, dynamic>)
    ..box_orders = (json['box_orders'] as List)
        ?.map((e) =>
            e == null ? null : BoxOrder.fromJson(e as Map<String, dynamic>))
        ?.toList();
}

Map<String, dynamic> _$UserSubscriptionToJson(UserSubscription instance) =>
    <String, dynamic>{
      'id': instance.id,
      'pricing_id': instance.pricing_id,
      'user_id': instance.user_id,
      'role_id': instance.role_id,
      'start_date': instance.start_date?.toIso8601String(),
      'end_date': instance.end_date?.toIso8601String(),
      'price': instance.price,
      'wod_counter': instance.wod_counter,
      'open_counter': instance.open_counter,
      'total_counter': instance.total_counter,
      'stripe_id': instance.stripe_id,
      'renew': instance.renew,
      'created_at': instance.created_at?.toIso8601String(),
      'updated_at': instance.updated_at?.toIso8601String(),
      'ends_at': instance.ends_at?.toIso8601String(),
      'active': instance.active,
      'company_id': instance.company_id,
      'box_ids': instance.box_ids,
      'pricing': instance.pricing,
      'role': instance.role,
      'company': instance.company,
      'user': instance.user,
      'box_orders': instance.box_orders,
    };
