toModel method
Implementation
UserMessagingModel toModel() {
final model = UserMessagingModel(
uid: uid,
snapshot: snapshot,
createdAt: createdAt?.millisecondsSinceEpoch.toDouble(),
userId: userId!,
fcmTokens: fcmTokens,
updatedAt: updatedAt is DateTime
? updatedAt!.millisecondsSinceEpoch.toDouble()
: null,
);
return model;
}