Firebase/Firestore 聊天应用程序的数据模型

Data Model for Firebase/Firestore chat application

这是我用于测试聊天应用程序的当前 Firebase/Firestore 数据模型。但是,这种模型很难用于 Android 端的推送通知。当用户 phone 从他们所属的任何频道收到消息时,我想向他们发送推送通知。此外还需要添加 file/image 条消息。

我可以作为参考使用的聊天应用程序的任何建议或良好数据模型的示例。

如果您想尝试另一种有关 Cloud Firestore 数据库架构的方法,您可以在此处找到有关如何 structure the database 聊天应用程序的教程。

我也在我的另一个教程中一步一步地解释了如何发送 notifications to specific users using Cloud Firestore and Node.js. You can also take a look at my answer from this .