// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'payment_line_model.dart';

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

class PaymentLineModelAdapter extends TypeAdapter<PaymentLineModel> {
  @override
  final typeId = 9;

  @override
  PaymentLineModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return PaymentLineModel(
      paymentLineId: fields[0] as String,
      invoiceId: fields[1] as String,
      paymentNumber: fields[2] as String,
      paymentDate: fields[3] as DateTime,
      amount: (fields[4] as num).toDouble(),
      paymentMethod: fields[5] as PaymentMethod,
      bankName: fields[6] as String?,
      bankAccount: fields[7] as String?,
      referenceNumber: fields[8] as String?,
      notes: fields[9] as String?,
      status: fields[10] as PaymentStatus,
      receiptUrl: fields[11] as String?,
      erpnextPaymentEntry: fields[12] as String?,
      createdAt: fields[13] as DateTime,
      processedAt: fields[14] as DateTime?,
    );
  }

  @override
  void write(BinaryWriter writer, PaymentLineModel obj) {
    writer
      ..writeByte(15)
      ..writeByte(0)
      ..write(obj.paymentLineId)
      ..writeByte(1)
      ..write(obj.invoiceId)
      ..writeByte(2)
      ..write(obj.paymentNumber)
      ..writeByte(3)
      ..write(obj.paymentDate)
      ..writeByte(4)
      ..write(obj.amount)
      ..writeByte(5)
      ..write(obj.paymentMethod)
      ..writeByte(6)
      ..write(obj.bankName)
      ..writeByte(7)
      ..write(obj.bankAccount)
      ..writeByte(8)
      ..write(obj.referenceNumber)
      ..writeByte(9)
      ..write(obj.notes)
      ..writeByte(10)
      ..write(obj.status)
      ..writeByte(11)
      ..write(obj.receiptUrl)
      ..writeByte(12)
      ..write(obj.erpnextPaymentEntry)
      ..writeByte(13)
      ..write(obj.createdAt)
      ..writeByte(14)
      ..write(obj.processedAt);
  }

  @override
  int get hashCode => typeId.hashCode;

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