// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'design_request_model.dart';

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

class DesignRequestModelAdapter extends TypeAdapter<DesignRequestModel> {
  @override
  final typeId = 15;

  @override
  DesignRequestModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return DesignRequestModel(
      requestId: fields[0] as String,
      userId: fields[1] as String,
      projectName: fields[2] as String,
      projectType: fields[3] as ProjectType,
      area: (fields[4] as num).toDouble(),
      style: fields[5] as String,
      budget: (fields[6] as num).toDouble(),
      currentSituation: fields[7] as String,
      requirements: fields[8] as String,
      notes: fields[9] as String?,
      attachments: fields[10] as String?,
      status: fields[11] as DesignStatus,
      assignedDesigner: fields[12] as String?,
      finalDesignLink: fields[13] as String?,
      feedback: fields[14] as String?,
      rating: (fields[15] as num?)?.toInt(),
      estimatedCompletion: fields[16] as DateTime?,
      createdAt: fields[17] as DateTime,
      completedAt: fields[18] as DateTime?,
      updatedAt: fields[19] as DateTime?,
    );
  }

  @override
  void write(BinaryWriter writer, DesignRequestModel obj) {
    writer
      ..writeByte(20)
      ..writeByte(0)
      ..write(obj.requestId)
      ..writeByte(1)
      ..write(obj.userId)
      ..writeByte(2)
      ..write(obj.projectName)
      ..writeByte(3)
      ..write(obj.projectType)
      ..writeByte(4)
      ..write(obj.area)
      ..writeByte(5)
      ..write(obj.style)
      ..writeByte(6)
      ..write(obj.budget)
      ..writeByte(7)
      ..write(obj.currentSituation)
      ..writeByte(8)
      ..write(obj.requirements)
      ..writeByte(9)
      ..write(obj.notes)
      ..writeByte(10)
      ..write(obj.attachments)
      ..writeByte(11)
      ..write(obj.status)
      ..writeByte(12)
      ..write(obj.assignedDesigner)
      ..writeByte(13)
      ..write(obj.finalDesignLink)
      ..writeByte(14)
      ..write(obj.feedback)
      ..writeByte(15)
      ..write(obj.rating)
      ..writeByte(16)
      ..write(obj.estimatedCompletion)
      ..writeByte(17)
      ..write(obj.createdAt)
      ..writeByte(18)
      ..write(obj.completedAt)
      ..writeByte(19)
      ..write(obj.updatedAt);
  }

  @override
  int get hashCode => typeId.hashCode;

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