我已经创建了一个具有以下结构的Firebase数据库:有3个主集合:用户、聊天和另一个暂时不重要的数据库。我最初计划将类型文档存储在User集合中,类型用户由以下属性组成:
uid -> string
... (some others which are not important)
displayName -> string
chatsList -> a SUBCOLLECTION of chat references, containing
chat ID
otherUserID -> the ID of the other us