// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'points_record_model.dart';

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

class PointsRecordModelAdapter extends TypeAdapter<PointsRecordModel> {
  @override
  final typeId = 13;

  @override
  PointsRecordModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return PointsRecordModel(
      recordId: fields[0] as String,
      userId: fields[1] as String,
      invoiceNumber: fields[2] as String,
      storeName: fields[3] as String,
      transactionDate: fields[4] as DateTime,
      invoiceAmount: (fields[5] as num).toDouble(),
      notes: fields[6] as String?,
      attachments: fields[7] as String?,
      status: fields[8] as PointsStatus,
      rejectReason: fields[9] as String?,
      pointsEarned: (fields[10] as num?)?.toInt(),
      submittedAt: fields[11] as DateTime,
      processedAt: fields[12] as DateTime?,
      processedBy: fields[13] as String?,
    );
  }

  @override
  void write(BinaryWriter writer, PointsRecordModel obj) {
    writer
      ..writeByte(14)
      ..writeByte(0)
      ..write(obj.recordId)
      ..writeByte(1)
      ..write(obj.userId)
      ..writeByte(2)
      ..write(obj.invoiceNumber)
      ..writeByte(3)
      ..write(obj.storeName)
      ..writeByte(4)
      ..write(obj.transactionDate)
      ..writeByte(5)
      ..write(obj.invoiceAmount)
      ..writeByte(6)
      ..write(obj.notes)
      ..writeByte(7)
      ..write(obj.attachments)
      ..writeByte(8)
      ..write(obj.status)
      ..writeByte(9)
      ..write(obj.rejectReason)
      ..writeByte(10)
      ..write(obj.pointsEarned)
      ..writeByte(11)
      ..write(obj.submittedAt)
      ..writeByte(12)
      ..write(obj.processedAt)
      ..writeByte(13)
      ..write(obj.processedBy);
  }

  @override
  int get hashCode => typeId.hashCode;

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