// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'inventory_history_view_model.dart';

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

_$InventoryHistoryViewModelImpl _$$InventoryHistoryViewModelImplFromJson(
        Map<String, dynamic> json) =>
    _$InventoryHistoryViewModelImpl(
      historyId: (json['history_id'] as num).toInt(),
      equipmentId: (json['equipment_id'] as num).toInt(),
      equipmentName: json['equipment_name'] as String,
      serialNumber: json['serial_number'] as String,
      location: json['location'] as String,
      changedDate: DateTime.parse(json['changed_date'] as String),
      remark: json['remark'] as String?,
      transactionType: json['transaction_type'] as String,
      quantity: (json['quantity'] as num).toInt(),
    );

Map<String, dynamic> _$$InventoryHistoryViewModelImplToJson(
        _$InventoryHistoryViewModelImpl instance) =>
    <String, dynamic>{
      'history_id': instance.historyId,
      'equipment_id': instance.equipmentId,
      'equipment_name': instance.equipmentName,
      'serial_number': instance.serialNumber,
      'location': instance.location,
      'changed_date': instance.changedDate.toIso8601String(),
      'remark': instance.remark,
      'transaction_type': instance.transactionType,
      'quantity': instance.quantity,
    };

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

_$InventoryHistoryQueryImpl _$$InventoryHistoryQueryImplFromJson(
        Map<String, dynamic> json) =>
    _$InventoryHistoryQueryImpl(
      page: (json['page'] as num?)?.toInt(),
      pageSize: (json['page_size'] as num?)?.toInt(),
      searchKeyword: json['search_keyword'] as String?,
      transactionType: json['transaction_type'] as String?,
      equipmentId: (json['equipment_id'] as num?)?.toInt(),
      warehouseId: (json['warehouse_id'] as num?)?.toInt(),
      companyId: (json['company_id'] as num?)?.toInt(),
      dateFrom: json['date_from'] == null
          ? null
          : DateTime.parse(json['date_from'] as String),
      dateTo: json['date_to'] == null
          ? null
          : DateTime.parse(json['date_to'] as String),
    );

Map<String, dynamic> _$$InventoryHistoryQueryImplToJson(
        _$InventoryHistoryQueryImpl instance) =>
    <String, dynamic>{
      'page': instance.page,
      'page_size': instance.pageSize,
      'search_keyword': instance.searchKeyword,
      'transaction_type': instance.transactionType,
      'equipment_id': instance.equipmentId,
      'warehouse_id': instance.warehouseId,
      'company_id': instance.companyId,
      'date_from': instance.dateFrom?.toIso8601String(),
      'date_to': instance.dateTo?.toIso8601String(),
    };
