// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'audience_target_model.dart';

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

class AudienceTargetModelAdapter extends TypeAdapter<AudienceTargetModel> {
  @override
  final int typeId = 23;

  @override
  AudienceTargetModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return AudienceTargetModel(
      id: fields[0] as String,
      conversationId: fields[1] as String,
      targetType: fields[2] as String,
      targetId: fields[3] as String?,
      createdAt: fields[4] as DateTime,
      roleFilter: fields[5] as String?,
      entityFilter: fields[6] as String?,
    );
  }

  @override
  void write(BinaryWriter writer, AudienceTargetModel obj) {
    writer
      ..writeByte(7)
      ..writeByte(0)
      ..write(obj.id)
      ..writeByte(1)
      ..write(obj.conversationId)
      ..writeByte(2)
      ..write(obj.targetType)
      ..writeByte(3)
      ..write(obj.targetId)
      ..writeByte(4)
      ..write(obj.createdAt)
      ..writeByte(5)
      ..write(obj.roleFilter)
      ..writeByte(6)
      ..write(obj.entityFilter);
  }

  @override
  int get hashCode => typeId.hashCode;

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