// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'member_card_model.dart';

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

class MemberCardModelAdapter extends TypeAdapter<MemberCardModel> {
  @override
  final typeId = 25;

  @override
  MemberCardModel read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return MemberCardModel(
      memberId: fields[0] as String,
      name: fields[1] as String,
      memberType: fields[2] as String,
      tier: fields[3] as String,
      points: (fields[4] as num).toInt(),
      validUntil: fields[5] as String,
      qrData: fields[6] as String,
    );
  }

  @override
  void write(BinaryWriter writer, MemberCardModel obj) {
    writer
      ..writeByte(7)
      ..writeByte(0)
      ..write(obj.memberId)
      ..writeByte(1)
      ..write(obj.name)
      ..writeByte(2)
      ..write(obj.memberType)
      ..writeByte(3)
      ..write(obj.tier)
      ..writeByte(4)
      ..write(obj.points)
      ..writeByte(5)
      ..write(obj.validUntil)
      ..writeByte(6)
      ..write(obj.qrData);
  }

  @override
  int get hashCode => typeId.hashCode;

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