// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'image_model.dart';

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

class ImageModelAdapter extends TypeAdapter<ImageModel> {
  @override
  final int typeId = 2;

  @override
  ImageModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return ImageModel(
      uuid: fields[0] as String?,
      name: fields[1] as String?,
      imageUrl: fields[2] as String?,
      width: fields[3] as int?,
      height: fields[4] as int?,
      tags: (fields[5] as List?)?.cast<TagsModel>(),
      tagsv2: (fields[6] as List?)?.cast<String>(),
      generateInfo: fields[7] as GenerateInfoModel?,
      createTime: fields[8] as String?,
      likeCount: fields[9] as int?,
      heat: fields[10] as int?,
    );
  }

  @override
  void write(BinaryWriter writer, ImageModel obj) {
    writer
      ..writeByte(11)
      ..writeByte(0)
      ..write(obj.uuid)
      ..writeByte(1)
      ..write(obj.name)
      ..writeByte(2)
      ..write(obj.imageUrl)
      ..writeByte(3)
      ..write(obj.width)
      ..writeByte(4)
      ..write(obj.height)
      ..writeByte(5)
      ..write(obj.tags)
      ..writeByte(6)
      ..write(obj.tagsv2)
      ..writeByte(7)
      ..write(obj.generateInfo)
      ..writeByte(8)
      ..write(obj.createTime)
      ..writeByte(9)
      ..write(obj.likeCount)
      ..writeByte(10)
      ..write(obj.heat);
  }

  @override
  int get hashCode => typeId.hashCode;

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