// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'history_model.dart';

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

class HistoryEntityAdapter extends TypeAdapter<HistoryModel> {
  @override
  final int typeId = 1;

  @override
  HistoryModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return HistoryModel(
      translationTime: fields[1] as int?,
      sourceText: fields[2] as String?,
      targetText: fields[3] as String?,
      sourceLanguageName: fields[4] as String?,
      sourceLanguageCode: fields[5] as String?,
      targetLanguageName: fields[6] as String?,
      targetLanguageCode: fields[7] as String?,
    );
  }

  @override
  void write(BinaryWriter writer, HistoryModel obj) {
    writer
      ..writeByte(7)
      ..writeByte(1)
      ..write(obj.translationTime)
      ..writeByte(2)
      ..write(obj.sourceText)
      ..writeByte(3)
      ..write(obj.targetText)
      ..writeByte(4)
      ..write(obj.sourceLanguageName)
      ..writeByte(5)
      ..write(obj.sourceLanguageCode)
      ..writeByte(6)
      ..write(obj.targetLanguageName)
      ..writeByte(7)
      ..write(obj.targetLanguageCode);
  }

  @override
  int get hashCode => typeId.hashCode;

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