66 lines
1.7 KiB
Dart
66 lines
1.7 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'participant_model.dart';
|
|
|
|
// **************************************************************************
|
|
// TypeAdapterGenerator
|
|
// **************************************************************************
|
|
|
|
class ParticipantModelAdapter extends TypeAdapter<ParticipantModel> {
|
|
@override
|
|
final int typeId = 22;
|
|
|
|
@override
|
|
ParticipantModel read(BinaryReader reader) {
|
|
final numOfFields = reader.readByte();
|
|
final fields = <int, dynamic>{
|
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
|
};
|
|
return ParticipantModel(
|
|
id: fields[0] as String,
|
|
conversationId: fields[1] as String,
|
|
userId: fields[2] as String?,
|
|
anonymousId: fields[3] as String?,
|
|
role: fields[4] as String,
|
|
joinedAt: fields[5] as DateTime,
|
|
lastReadMessageId: fields[6] as String?,
|
|
viaTarget: fields[7] as bool,
|
|
canReply: fields[8] as bool?,
|
|
);
|
|
}
|
|
|
|
@override
|
|
void write(BinaryWriter writer, ParticipantModel obj) {
|
|
writer
|
|
..writeByte(9)
|
|
..writeByte(0)
|
|
..write(obj.id)
|
|
..writeByte(1)
|
|
..write(obj.conversationId)
|
|
..writeByte(2)
|
|
..write(obj.userId)
|
|
..writeByte(3)
|
|
..write(obj.anonymousId)
|
|
..writeByte(4)
|
|
..write(obj.role)
|
|
..writeByte(5)
|
|
..write(obj.joinedAt)
|
|
..writeByte(6)
|
|
..write(obj.lastReadMessageId)
|
|
..writeByte(7)
|
|
..write(obj.viaTarget)
|
|
..writeByte(8)
|
|
..write(obj.canReply);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => typeId.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is ParticipantModelAdapter &&
|
|
runtimeType == other.runtimeType &&
|
|
typeId == other.typeId;
|
|
}
|