// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'user_model.dart';

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

class UserModelAdapter extends TypeAdapter<UserModel> {
  @override
  final int typeId = 0;

  @override
  UserModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return UserModel(
      id: fields[0] as int,
      email: fields[1] as String,
      name: fields[2] as String?,
      username: fields[11] as String?,
      firstName: fields[10] as String?,
      role: fields[3] as int,
      createdAt: fields[4] as DateTime,
      lastSyncedAt: fields[5] as DateTime,
      isActive: fields[6] as bool,
      isSynced: fields[7] as bool,
      sessionId: fields[8] as String?,
      sessionExpiry: fields[9] as DateTime?,
      lastPath: fields[12] as String?,
      sectName: fields[13] as String?,
      fkEntite: fields[14] as int?,
      fkTitre: fields[15] as int?,
      phone: fields[16] as String?,
      mobile: fields[17] as String?,
      dateNaissance: fields[18] as DateTime?,
      dateEmbauche: fields[19] as DateTime?,
      opeUserId: fields[20] as int?,
    );
  }

  @override
  void write(BinaryWriter writer, UserModel obj) {
    writer
      ..writeByte(21)
      ..writeByte(0)
      ..write(obj.id)
      ..writeByte(1)
      ..write(obj.email)
      ..writeByte(2)
      ..write(obj.name)
      ..writeByte(11)
      ..write(obj.username)
      ..writeByte(10)
      ..write(obj.firstName)
      ..writeByte(3)
      ..write(obj.role)
      ..writeByte(4)
      ..write(obj.createdAt)
      ..writeByte(5)
      ..write(obj.lastSyncedAt)
      ..writeByte(6)
      ..write(obj.isActive)
      ..writeByte(7)
      ..write(obj.isSynced)
      ..writeByte(8)
      ..write(obj.sessionId)
      ..writeByte(9)
      ..write(obj.sessionExpiry)
      ..writeByte(12)
      ..write(obj.lastPath)
      ..writeByte(13)
      ..write(obj.sectName)
      ..writeByte(14)
      ..write(obj.fkEntite)
      ..writeByte(15)
      ..write(obj.fkTitre)
      ..writeByte(16)
      ..write(obj.phone)
      ..writeByte(17)
      ..write(obj.mobile)
      ..writeByte(18)
      ..write(obj.dateNaissance)
      ..writeByte(19)
      ..write(obj.dateEmbauche)
      ..writeByte(20)
      ..write(obj.opeUserId);
  }

  @override
  int get hashCode => typeId.hashCode;

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