// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'stock_level_model.dart';

// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************

class StockLevelModelAdapter extends TypeAdapter<StockLevelModel> {
  @override
  final typeId = 3;

  @override
  StockLevelModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return StockLevelModel(
      productId: fields[0] as String,
      availableQty: (fields[1] as num).toDouble(),
      reservedQty: (fields[2] as num).toDouble(),
      orderedQty: (fields[3] as num).toDouble(),
      warehouseCode: fields[4] as String,
      lastUpdated: fields[5] as DateTime,
    );
  }

  @override
  void write(BinaryWriter writer, StockLevelModel obj) {
    writer
      ..writeByte(6)
      ..writeByte(0)
      ..write(obj.productId)
      ..writeByte(1)
      ..write(obj.availableQty)
      ..writeByte(2)
      ..write(obj.reservedQty)
      ..writeByte(3)
      ..write(obj.orderedQty)
      ..writeByte(4)
      ..write(obj.warehouseCode)
      ..writeByte(5)
      ..write(obj.lastUpdated);
  }

  @override
  int get hashCode => typeId.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is StockLevelModelAdapter &&
          runtimeType == other.runtimeType &&
          typeId == other.typeId;
}
