// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'product_model.dart';

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

class ProductModelAdapter extends TypeAdapter<ProductModel> {
  @override
  final typeId = 2;

  @override
  ProductModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return ProductModel(
      productId: fields[0] as String,
      name: fields[1] as String,
      description: fields[2] as String?,
      basePrice: (fields[3] as num).toDouble(),
      images: fields[4] as String?,
      thumbnail: fields[5] as String,
      imageCaptions: fields[6] as String?,
      customLink360: fields[7] as String?,
      specifications: fields[8] as String?,
      itemGroupName: fields[9] as String?,
      brand: fields[10] as String?,
      conversionOfSm: (fields[17] as num?)?.toDouble(),
      introAttributes: fields[18] as String?,
      isActive: fields[12] as bool,
      isFeatured: fields[13] as bool,
      erpnextItemCode: fields[14] as String?,
      createdAt: fields[15] as DateTime,
      updatedAt: fields[16] as DateTime?,
    );
  }

  @override
  void write(BinaryWriter writer, ProductModel obj) {
    writer
      ..writeByte(18)
      ..writeByte(0)
      ..write(obj.productId)
      ..writeByte(1)
      ..write(obj.name)
      ..writeByte(2)
      ..write(obj.description)
      ..writeByte(3)
      ..write(obj.basePrice)
      ..writeByte(4)
      ..write(obj.images)
      ..writeByte(5)
      ..write(obj.thumbnail)
      ..writeByte(6)
      ..write(obj.imageCaptions)
      ..writeByte(7)
      ..write(obj.customLink360)
      ..writeByte(8)
      ..write(obj.specifications)
      ..writeByte(9)
      ..write(obj.itemGroupName)
      ..writeByte(10)
      ..write(obj.brand)
      ..writeByte(12)
      ..write(obj.isActive)
      ..writeByte(13)
      ..write(obj.isFeatured)
      ..writeByte(14)
      ..write(obj.erpnextItemCode)
      ..writeByte(15)
      ..write(obj.createdAt)
      ..writeByte(16)
      ..write(obj.updatedAt)
      ..writeByte(17)
      ..write(obj.conversionOfSm)
      ..writeByte(18)
      ..write(obj.introAttributes);
  }

  @override
  int get hashCode => typeId.hashCode;

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