// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'equipment_response.dart';

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

_$EquipmentResponseImpl _$$EquipmentResponseImplFromJson(
        Map<String, dynamic> json) =>
    _$EquipmentResponseImpl(
      id: (json['id'] as num).toInt(),
      equipmentNumber: json['equipment_number'] as String,
      modelsId: (json['models_id'] as num?)?.toInt(),
      serialNumber: json['serial_number'] as String?,
      barcode: json['barcode'] as String?,
      purchaseDate: json['purchase_date'] == null
          ? null
          : DateTime.parse(json['purchase_date'] as String),
      purchasePrice: json['purchase_price'] as String?,
      status: const EquipmentStatusJsonConverter()
          .fromJson(json['status'] as String),
      companyId: (json['company_id'] as num?)?.toInt(),
      warehouseLocationId: (json['warehouse_location_id'] as num?)?.toInt(),
      lastInspectionDate: json['last_inspection_date'] == null
          ? null
          : DateTime.parse(json['last_inspection_date'] as String),
      nextInspectionDate: json['next_inspection_date'] == null
          ? null
          : DateTime.parse(json['next_inspection_date'] as String),
      remark: json['remark'] as String?,
      createdAt: DateTime.parse(json['created_at'] as String),
      updatedAt: DateTime.parse(json['updated_at'] as String),
      companyName: json['company_name'] as String?,
      warehouseName: json['warehouse_name'] as String?,
      model: json['model'] == null
          ? null
          : ModelDto.fromJson(json['model'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$$EquipmentResponseImplToJson(
        _$EquipmentResponseImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'equipment_number': instance.equipmentNumber,
      'models_id': instance.modelsId,
      'serial_number': instance.serialNumber,
      'barcode': instance.barcode,
      'purchase_date': instance.purchaseDate?.toIso8601String(),
      'purchase_price': instance.purchasePrice,
      'status': const EquipmentStatusJsonConverter().toJson(instance.status),
      'company_id': instance.companyId,
      'warehouse_location_id': instance.warehouseLocationId,
      'last_inspection_date': instance.lastInspectionDate?.toIso8601String(),
      'next_inspection_date': instance.nextInspectionDate?.toIso8601String(),
      'remark': instance.remark,
      'created_at': instance.createdAt.toIso8601String(),
      'updated_at': instance.updatedAt.toIso8601String(),
      'company_name': instance.companyName,
      'warehouse_name': instance.warehouseName,
      'model': instance.model,
    };
