首页 文章

使用Angular建模Firestore结构

提问于
浏览
0

如何使用Firestore和Angular进行结构化?

在JSON Cloud Firestore数据库中,我需要插入人员 .

这些人将与用户相关,因此我需要创建一个节点 .

如何创建一个节点,以便银行中的查询快速有效?

我认为将所有人保存在单个集合中是不正确的,因为查询会非常耗时 .

user1 ://与此用户相关的人员

personList

2 people registered

[{'name': 'person 1'}, {'name': 'person 2'}]

user2: //与此用户相关的人员

personList

3 people registered

[{'name': 'another person 1'}, {'name': 'another person 2'}, {'name': 'another person 3'}]

如果我使用 user1 注册10 people ,如果我使用 user1 登录系统,则只应列出与 user1 相关的 people .

1 回答

相关问题