// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'equipment_request.dart';

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

_$CreateEquipmentRequestImpl _$$CreateEquipmentRequestImplFromJson(
        Map<String, dynamic> json) =>
    _$CreateEquipmentRequestImpl(
      equipmentNumber: json['equipmentNumber'] as String,
      category1: json['category1'] as String?,
      category2: json['category2'] as String?,
      category3: json['category3'] as String?,
      manufacturer: json['manufacturer'] as String,
      modelName: json['modelName'] as String?,
      serialNumber: json['serialNumber'] as String?,
      purchaseDate: json['purchaseDate'] == null
          ? null
          : DateTime.parse(json['purchaseDate'] as String),
      purchasePrice: (json['purchasePrice'] as num?)?.toDouble(),
      remark: json['remark'] as String?,
    );

Map<String, dynamic> _$$CreateEquipmentRequestImplToJson(
        _$CreateEquipmentRequestImpl instance) =>
    <String, dynamic>{
      'equipmentNumber': instance.equipmentNumber,
      'category1': instance.category1,
      'category2': instance.category2,
      'category3': instance.category3,
      'manufacturer': instance.manufacturer,
      'modelName': instance.modelName,
      'serialNumber': instance.serialNumber,
      'purchaseDate': instance.purchaseDate?.toIso8601String(),
      'purchasePrice': instance.purchasePrice,
      'remark': instance.remark,
    };

_$UpdateEquipmentRequestImpl _$$UpdateEquipmentRequestImplFromJson(
        Map<String, dynamic> json) =>
    _$UpdateEquipmentRequestImpl(
      category1: json['category1'] as String?,
      category2: json['category2'] as String?,
      category3: json['category3'] as String?,
      manufacturer: json['manufacturer'] as String?,
      modelName: json['modelName'] as String?,
      serialNumber: json['serialNumber'] as String?,
      barcode: json['barcode'] as String?,
      purchaseDate: json['purchaseDate'] == null
          ? null
          : DateTime.parse(json['purchaseDate'] as String),
      purchasePrice: (json['purchasePrice'] as num?)?.toDouble(),
      status: _$JsonConverterFromJson<String, String>(
          json['status'], const EquipmentStatusJsonConverter().fromJson),
      currentCompanyId: (json['currentCompanyId'] as num?)?.toInt(),
      currentBranchId: (json['currentBranchId'] as num?)?.toInt(),
      warehouseLocationId: (json['warehouseLocationId'] as num?)?.toInt(),
      lastInspectionDate: json['lastInspectionDate'] == null
          ? null
          : DateTime.parse(json['lastInspectionDate'] as String),
      nextInspectionDate: json['nextInspectionDate'] == null
          ? null
          : DateTime.parse(json['nextInspectionDate'] as String),
      remark: json['remark'] as String?,
    );

Map<String, dynamic> _$$UpdateEquipmentRequestImplToJson(
        _$UpdateEquipmentRequestImpl instance) =>
    <String, dynamic>{
      'category1': instance.category1,
      'category2': instance.category2,
      'category3': instance.category3,
      'manufacturer': instance.manufacturer,
      'modelName': instance.modelName,
      'serialNumber': instance.serialNumber,
      'barcode': instance.barcode,
      'purchaseDate': instance.purchaseDate?.toIso8601String(),
      'purchasePrice': instance.purchasePrice,
      'status': _$JsonConverterToJson<String, String>(
          instance.status, const EquipmentStatusJsonConverter().toJson),
      'currentCompanyId': instance.currentCompanyId,
      'currentBranchId': instance.currentBranchId,
      'warehouseLocationId': instance.warehouseLocationId,
      'lastInspectionDate': instance.lastInspectionDate?.toIso8601String(),
      'nextInspectionDate': instance.nextInspectionDate?.toIso8601String(),
      'remark': instance.remark,
    };

Value? _$JsonConverterFromJson<Json, Value>(
  Object? json,
  Value? Function(Json json) fromJson,
) =>
    json == null ? null : fromJson(json as Json);

Json? _$JsonConverterToJson<Json, Value>(
  Value? value,
  Json? Function(Value value) toJson,
) =>
    value == null ? null : toJson(value);
