// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'business_unit_model.dart';

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

class BusinessUnitModelAdapter extends TypeAdapter<BusinessUnitModel> {
  @override
  final typeId = 29;

  @override
  BusinessUnitModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return BusinessUnitModel(
      id: fields[0] as String,
      code: fields[1] as String,
      name: fields[2] as String,
      description: fields[3] as String?,
      isDefault: fields[4] == null ? false : fields[4] as bool,
    );
  }

  @override
  void write(BinaryWriter writer, BusinessUnitModel obj) {
    writer
      ..writeByte(5)
      ..writeByte(0)
      ..write(obj.id)
      ..writeByte(1)
      ..write(obj.code)
      ..writeByte(2)
      ..write(obj.name)
      ..writeByte(3)
      ..write(obj.description)
      ..writeByte(4)
      ..write(obj.isDefault);
  }

  @override
  int get hashCode => typeId.hashCode;

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