// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'audit_log_model.dart';

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

class AuditLogModelAdapter extends TypeAdapter<AuditLogModel> {
  @override
  final typeId = 24;

  @override
  AuditLogModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return AuditLogModel(
      logId: (fields[0] as num).toInt(),
      userId: fields[1] as String,
      action: fields[2] as String,
      entityType: fields[3] as String,
      entityId: fields[4] as String,
      oldValue: fields[5] as String?,
      newValue: fields[6] as String?,
      ipAddress: fields[7] as String?,
      userAgent: fields[8] as String?,
      timestamp: fields[9] as DateTime,
    );
  }

  @override
  void write(BinaryWriter writer, AuditLogModel obj) {
    writer
      ..writeByte(10)
      ..writeByte(0)
      ..write(obj.logId)
      ..writeByte(1)
      ..write(obj.userId)
      ..writeByte(2)
      ..write(obj.action)
      ..writeByte(3)
      ..write(obj.entityType)
      ..writeByte(4)
      ..write(obj.entityId)
      ..writeByte(5)
      ..write(obj.oldValue)
      ..writeByte(6)
      ..write(obj.newValue)
      ..writeByte(7)
      ..write(obj.ipAddress)
      ..writeByte(8)
      ..write(obj.userAgent)
      ..writeByte(9)
      ..write(obj.timestamp);
  }

  @override
  int get hashCode => typeId.hashCode;

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