// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'equipment_list_dto.dart';

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

_$EquipmentListDtoImpl _$$EquipmentListDtoImplFromJson(
        Map<String, dynamic> json) =>
    _$EquipmentListDtoImpl(
      id: (json['id'] as num).toInt(),
      companiesId: (json['companies_id'] as num?)?.toInt(),
      companyName: json['company_name'] as String?,
      modelsId: (json['models_id'] as num?)?.toInt(),
      modelName: json['model_name'] as String?,
      vendorName: json['vendor_name'] as String?,
      serialNumber: json['serial_number'] as String?,
      barcode: json['barcode'] as String?,
      purchasedAt: json['purchased_at'] == null
          ? null
          : DateTime.parse(json['purchased_at'] as String),
      purchasePrice: (json['purchase_price'] as num?)?.toInt(),
      warrantyNumber: json['warranty_number'] as String?,
      warrantyStartedAt: json['warranty_started_at'] == null
          ? null
          : DateTime.parse(json['warranty_started_at'] as String),
      warrantyEndedAt: json['warranty_ended_at'] == null
          ? null
          : DateTime.parse(json['warranty_ended_at'] as String),
      remark: json['remark'] as String?,
      isDeleted: json['is_deleted'] as bool?,
      registeredAt: json['registered_at'] == null
          ? null
          : DateTime.parse(json['registered_at'] as String),
      updatedAt: json['updated_at'] == null
          ? null
          : DateTime.parse(json['updated_at'] as String),
      model: json['model'] == null
          ? null
          : ModelDto.fromJson(json['model'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$$EquipmentListDtoImplToJson(
        _$EquipmentListDtoImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'companies_id': instance.companiesId,
      'company_name': instance.companyName,
      'models_id': instance.modelsId,
      'model_name': instance.modelName,
      'vendor_name': instance.vendorName,
      'serial_number': instance.serialNumber,
      'barcode': instance.barcode,
      'purchased_at': instance.purchasedAt?.toIso8601String(),
      'purchase_price': instance.purchasePrice,
      'warranty_number': instance.warrantyNumber,
      'warranty_started_at': instance.warrantyStartedAt?.toIso8601String(),
      'warranty_ended_at': instance.warrantyEndedAt?.toIso8601String(),
      'remark': instance.remark,
      'is_deleted': instance.isDeleted,
      'registered_at': instance.registeredAt?.toIso8601String(),
      'updated_at': instance.updatedAt?.toIso8601String(),
      'model': instance.model,
    };

_$EquipmentListResponseDtoImpl _$$EquipmentListResponseDtoImplFromJson(
        Map<String, dynamic> json) =>
    _$EquipmentListResponseDtoImpl(
      items: (json['items'] as List<dynamic>)
          .map((e) => EquipmentListDto.fromJson(e as Map<String, dynamic>))
          .toList(),
      total: (json['total'] as num).toInt(),
      page: (json['page'] as num).toInt(),
      perPage: (json['per_page'] as num).toInt(),
      totalPages: (json['total_pages'] as num).toInt(),
    );

Map<String, dynamic> _$$EquipmentListResponseDtoImplToJson(
        _$EquipmentListResponseDtoImpl instance) =>
    <String, dynamic>{
      'items': instance.items,
      'total': instance.total,
      'page': instance.page,
      'per_page': instance.perPage,
      'total_pages': instance.totalPages,
    };
