// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'haircut_model.dart';

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

class HaircutModelAdapter extends TypeAdapter<HaircutModel> {
  @override
  final int typeId = 1;

  @override
  HaircutModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return HaircutModel(
      id: fields[0] as String,
      userId: fields[1] as String,
      clientName: fields[2] as String,
      serviceType: fields[3] as String,
      price: fields[4] as double,
      dateTime: fields[5] as DateTime,
      notes: fields[6] as String?,
      transactionId: fields[7] as String?,
      paymentMethod: fields[8] == null ? 'Dinheiro' : fields[8] as String,
    );
  }

  @override
  void write(BinaryWriter writer, HaircutModel obj) {
    writer
      ..writeByte(9)
      ..writeByte(0)
      ..write(obj.id)
      ..writeByte(1)
      ..write(obj.userId)
      ..writeByte(2)
      ..write(obj.clientName)
      ..writeByte(3)
      ..write(obj.serviceType)
      ..writeByte(4)
      ..write(obj.price)
      ..writeByte(5)
      ..write(obj.dateTime)
      ..writeByte(6)
      ..write(obj.notes)
      ..writeByte(7)
      ..write(obj.transactionId)
      ..writeByte(8)
      ..write(obj.paymentMethod);
  }

  @override
  int get hashCode => typeId.hashCode;

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