// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'quote_item_model.dart';

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

class QuoteItemModelAdapter extends TypeAdapter<QuoteItemModel> {
  @override
  final typeId = 17;

  @override
  QuoteItemModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return QuoteItemModel(
      quoteItemId: fields[0] as String,
      quoteId: fields[1] as String,
      productId: fields[2] as String,
      quantity: (fields[3] as num).toDouble(),
      originalPrice: (fields[4] as num).toDouble(),
      negotiatedPrice: (fields[5] as num).toDouble(),
      discountPercent: (fields[6] as num).toDouble(),
      subtotal: (fields[7] as num).toDouble(),
      notes: fields[8] as String?,
    );
  }

  @override
  void write(BinaryWriter writer, QuoteItemModel obj) {
    writer
      ..writeByte(9)
      ..writeByte(0)
      ..write(obj.quoteItemId)
      ..writeByte(1)
      ..write(obj.quoteId)
      ..writeByte(2)
      ..write(obj.productId)
      ..writeByte(3)
      ..write(obj.quantity)
      ..writeByte(4)
      ..write(obj.originalPrice)
      ..writeByte(5)
      ..write(obj.negotiatedPrice)
      ..writeByte(6)
      ..write(obj.discountPercent)
      ..writeByte(7)
      ..write(obj.subtotal)
      ..writeByte(8)
      ..write(obj.notes);
  }

  @override
  int get hashCode => typeId.hashCode;

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