// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'equipment_history_companies_link_dto.dart';

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

_$EquipmentHistoryCompaniesLinkDtoImpl
    _$$EquipmentHistoryCompaniesLinkDtoImplFromJson(
            Map<String, dynamic> json) =>
        _$EquipmentHistoryCompaniesLinkDtoImpl(
          id: (json['Id'] as num?)?.toInt(),
          companiesId: (json['companies_id'] as num).toInt(),
          equipmentHistoryId: (json['equipment_history_Id'] as num).toInt(),
          order: (json['Order'] as num?)?.toInt() ?? 1,
          isDeleted: json['is_deleted'] as bool? ?? false,
          registeredAt: DateTime.parse(json['registered_at'] as String),
          updatedAt: json['updated_at'] == null
              ? null
              : DateTime.parse(json['updated_at'] as String),
          company: json['company'] == null
              ? null
              : CompanyDto.fromJson(json['company'] as Map<String, dynamic>),
          equipmentHistory: json['equipmentHistory'] == null
              ? null
              : EquipmentHistoryDto.fromJson(
                  json['equipmentHistory'] as Map<String, dynamic>),
        );

Map<String, dynamic> _$$EquipmentHistoryCompaniesLinkDtoImplToJson(
        _$EquipmentHistoryCompaniesLinkDtoImpl instance) =>
    <String, dynamic>{
      'Id': instance.id,
      'companies_id': instance.companiesId,
      'equipment_history_Id': instance.equipmentHistoryId,
      'Order': instance.order,
      'is_deleted': instance.isDeleted,
      'registered_at': instance.registeredAt.toIso8601String(),
      'updated_at': instance.updatedAt?.toIso8601String(),
      'company': instance.company,
      'equipmentHistory': instance.equipmentHistory,
    };

_$EquipmentHistoryCompaniesLinkRequestDtoImpl
    _$$EquipmentHistoryCompaniesLinkRequestDtoImplFromJson(
            Map<String, dynamic> json) =>
        _$EquipmentHistoryCompaniesLinkRequestDtoImpl(
          companiesId: (json['companies_id'] as num).toInt(),
          equipmentHistoryId: (json['equipment_history_Id'] as num).toInt(),
          order: (json['Order'] as num?)?.toInt() ?? 1,
        );

Map<String, dynamic> _$$EquipmentHistoryCompaniesLinkRequestDtoImplToJson(
        _$EquipmentHistoryCompaniesLinkRequestDtoImpl instance) =>
    <String, dynamic>{
      'companies_id': instance.companiesId,
      'equipment_history_Id': instance.equipmentHistoryId,
      'Order': instance.order,
    };

_$EquipmentHistoryCompaniesLinkUpdateRequestDtoImpl
    _$$EquipmentHistoryCompaniesLinkUpdateRequestDtoImplFromJson(
            Map<String, dynamic> json) =>
        _$EquipmentHistoryCompaniesLinkUpdateRequestDtoImpl(
          companiesId: (json['companies_id'] as num?)?.toInt(),
          equipmentHistoryId: (json['equipment_history_Id'] as num?)?.toInt(),
          order: (json['Order'] as num?)?.toInt(),
        );

Map<String, dynamic> _$$EquipmentHistoryCompaniesLinkUpdateRequestDtoImplToJson(
        _$EquipmentHistoryCompaniesLinkUpdateRequestDtoImpl instance) =>
    <String, dynamic>{
      'companies_id': instance.companiesId,
      'equipment_history_Id': instance.equipmentHistoryId,
      'Order': instance.order,
    };

_$EquipmentHistoryCompaniesLinkListResponseImpl
    _$$EquipmentHistoryCompaniesLinkListResponseImplFromJson(
            Map<String, dynamic> json) =>
        _$EquipmentHistoryCompaniesLinkListResponseImpl(
          items: (json['data'] as List<dynamic>)
              .map((e) => EquipmentHistoryCompaniesLinkDto.fromJson(
                  e as Map<String, dynamic>))
              .toList(),
          totalCount: (json['total'] as num).toInt(),
          currentPage: (json['page'] as num).toInt(),
          totalPages: (json['total_pages'] as num).toInt(),
          pageSize: (json['page_size'] as num?)?.toInt(),
        );

Map<String, dynamic> _$$EquipmentHistoryCompaniesLinkListResponseImplToJson(
        _$EquipmentHistoryCompaniesLinkListResponseImpl instance) =>
    <String, dynamic>{
      'data': instance.items,
      'total': instance.totalCount,
      'page': instance.currentPage,
      'total_pages': instance.totalPages,
      'page_size': instance.pageSize,
    };
