// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'operation_model.dart';

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

class OperationModelAdapter extends TypeAdapter<OperationModel> {
  @override
  final int typeId = 1;

  @override
  OperationModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return OperationModel(
      id: fields[0] as int,
      name: fields[1] as String,
      dateDebut: fields[2] as DateTime,
      dateFin: fields[3] as DateTime,
      lastSyncedAt: fields[4] as DateTime,
      fkEntite: fields[7] as int,
      isActive: fields[5] as bool,
      isSynced: fields[6] as bool,
    );
  }

  @override
  void write(BinaryWriter writer, OperationModel obj) {
    writer
      ..writeByte(8)
      ..writeByte(0)
      ..write(obj.id)
      ..writeByte(1)
      ..write(obj.name)
      ..writeByte(2)
      ..write(obj.dateDebut)
      ..writeByte(3)
      ..write(obj.dateFin)
      ..writeByte(4)
      ..write(obj.lastSyncedAt)
      ..writeByte(5)
      ..write(obj.isActive)
      ..writeByte(6)
      ..write(obj.isSynced)
      ..writeByte(7)
      ..write(obj.fkEntite);
  }

  @override
  int get hashCode => typeId.hashCode;

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