// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'chat_room_model.dart';

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

class ChatRoomModelAdapter extends TypeAdapter<ChatRoomModel> {
  @override
  final typeId = 18;

  @override
  ChatRoomModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return ChatRoomModel(
      chatRoomId: fields[0] as String,
      roomType: fields[1] as RoomType,
      relatedQuoteId: fields[2] as String?,
      relatedOrderId: fields[3] as String?,
      participants: fields[4] as String,
      roomName: fields[5] as String?,
      isActive: fields[6] as bool,
      lastActivity: fields[7] as DateTime?,
      createdAt: fields[8] as DateTime,
      createdBy: fields[9] as String?,
    );
  }

  @override
  void write(BinaryWriter writer, ChatRoomModel obj) {
    writer
      ..writeByte(10)
      ..writeByte(0)
      ..write(obj.chatRoomId)
      ..writeByte(1)
      ..write(obj.roomType)
      ..writeByte(2)
      ..write(obj.relatedQuoteId)
      ..writeByte(3)
      ..write(obj.relatedOrderId)
      ..writeByte(4)
      ..write(obj.participants)
      ..writeByte(5)
      ..write(obj.roomName)
      ..writeByte(6)
      ..write(obj.isActive)
      ..writeByte(7)
      ..write(obj.lastActivity)
      ..writeByte(8)
      ..write(obj.createdAt)
      ..writeByte(9)
      ..write(obj.createdBy);
  }

  @override
  int get hashCode => typeId.hashCode;

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