// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'warehouse_dto.dart';

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

_$WarehouseDtoImpl _$$WarehouseDtoImplFromJson(Map<String, dynamic> json) =>
    _$WarehouseDtoImpl(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String,
      zipcodesZipcode: json['zipcodes_zipcode'] as String?,
      zipcodeAddress: json['zipcode_address'] as String?,
      remark: json['remark'] as String?,
      isDeleted: json['is_deleted'] as bool? ?? false,
      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),
      zipcode: json['zipcode'] == null
          ? null
          : ZipcodeDto.fromJson(json['zipcode'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$$WarehouseDtoImplToJson(_$WarehouseDtoImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'zipcodes_zipcode': instance.zipcodesZipcode,
      'zipcode_address': instance.zipcodeAddress,
      'remark': instance.remark,
      'is_deleted': instance.isDeleted,
      'registered_at': instance.registeredAt?.toIso8601String(),
      'updated_at': instance.updatedAt?.toIso8601String(),
      'zipcode': instance.zipcode,
    };

_$WarehouseRequestDtoImpl _$$WarehouseRequestDtoImplFromJson(
        Map<String, dynamic> json) =>
    _$WarehouseRequestDtoImpl(
      name: json['name'] as String,
      zipcodesZipcode: json['zipcodes_zipcode'] as String?,
      remark: json['remark'] as String?,
    );

Map<String, dynamic> _$$WarehouseRequestDtoImplToJson(
        _$WarehouseRequestDtoImpl instance) =>
    <String, dynamic>{
      'name': instance.name,
      'zipcodes_zipcode': instance.zipcodesZipcode,
      'remark': instance.remark,
    };

_$WarehouseUpdateRequestDtoImpl _$$WarehouseUpdateRequestDtoImplFromJson(
        Map<String, dynamic> json) =>
    _$WarehouseUpdateRequestDtoImpl(
      name: json['name'] as String?,
      zipcodesZipcode: json['zipcodes_zipcode'] as String?,
      remark: json['remark'] as String?,
    );

Map<String, dynamic> _$$WarehouseUpdateRequestDtoImplToJson(
        _$WarehouseUpdateRequestDtoImpl instance) =>
    <String, dynamic>{
      'name': instance.name,
      'zipcodes_zipcode': instance.zipcodesZipcode,
      'remark': instance.remark,
    };

_$WarehouseListResponseImpl _$$WarehouseListResponseImplFromJson(
        Map<String, dynamic> json) =>
    _$WarehouseListResponseImpl(
      items: (json['data'] as List<dynamic>)
          .map((e) => WarehouseDto.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> _$$WarehouseListResponseImplToJson(
        _$WarehouseListResponseImpl instance) =>
    <String, dynamic>{
      'data': instance.items,
      'total': instance.totalCount,
      'page': instance.currentPage,
      'total_pages': instance.totalPages,
      'page_size': instance.pageSize,
    };

_$WarehouseLocationListDtoImpl _$$WarehouseLocationListDtoImplFromJson(
        Map<String, dynamic> json) =>
    _$WarehouseLocationListDtoImpl(
      items: (json['items'] as List<dynamic>)
          .map((e) => WarehouseDto.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> _$$WarehouseLocationListDtoImplToJson(
        _$WarehouseLocationListDtoImpl instance) =>
    <String, dynamic>{
      'items': instance.items,
      'total': instance.total,
      'page': instance.page,
      'per_page': instance.perPage,
      'total_pages': instance.totalPages,
    };

_$WarehouseCapacityInfoImpl _$$WarehouseCapacityInfoImplFromJson(
        Map<String, dynamic> json) =>
    _$WarehouseCapacityInfoImpl(
      totalCapacity: (json['total_capacity'] as num?)?.toInt(),
      usedCapacity: (json['used_capacity'] as num?)?.toInt(),
      availableCapacity: (json['available_capacity'] as num?)?.toInt(),
    );

Map<String, dynamic> _$$WarehouseCapacityInfoImplToJson(
        _$WarehouseCapacityInfoImpl instance) =>
    <String, dynamic>{
      'total_capacity': instance.totalCapacity,
      'used_capacity': instance.usedCapacity,
      'available_capacity': instance.availableCapacity,
    };

_$WarehouseEquipmentListDtoImpl _$$WarehouseEquipmentListDtoImplFromJson(
        Map<String, dynamic> json) =>
    _$WarehouseEquipmentListDtoImpl(
      items: (json['items'] as List<dynamic>)
          .map((e) => WarehouseEquipmentDto.fromJson(e as Map<String, dynamic>))
          .toList(),
      total: (json['total'] as num).toInt(),
    );

Map<String, dynamic> _$$WarehouseEquipmentListDtoImplToJson(
        _$WarehouseEquipmentListDtoImpl instance) =>
    <String, dynamic>{
      'items': instance.items,
      'total': instance.total,
    };

_$WarehouseEquipmentDtoImpl _$$WarehouseEquipmentDtoImplFromJson(
        Map<String, dynamic> json) =>
    _$WarehouseEquipmentDtoImpl(
      id: (json['id'] as num?)?.toInt(),
      equipmentId: (json['equipment_id'] as num?)?.toInt(),
      warehouseId: (json['warehouse_id'] as num?)?.toInt(),
      name: json['name'] as String?,
      quantity: (json['quantity'] as num?)?.toInt(),
    );

Map<String, dynamic> _$$WarehouseEquipmentDtoImplToJson(
        _$WarehouseEquipmentDtoImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'equipment_id': instance.equipmentId,
      'warehouse_id': instance.warehouseId,
      'name': instance.name,
      'quantity': instance.quantity,
    };
