Mongodb Meteor中不同用户组的数据库模式

Mongodb Meteor中不同用户组的数据库模式,mongodb,meteor,schema,Mongodb,Meteor,Schema,我正在构建一个meteor应用程序,我希望分段的用户组能够访问数据库。例如,假设我有以下产品: products = new SimpleSchema({ name: String, price: Number }) 但我有两家公司在使用我的应用程序。我如何将他们的产品分开?我在想 products = new SimpleSchema({ name: String, price: Number, company: String }) 仅订阅用户公司匹配的产品。然而,这感

我正在构建一个meteor应用程序,我希望分段的用户组能够访问数据库。例如,假设我有以下产品:

products = new SimpleSchema({
  name: String,
  price: Number
})
但我有两家公司在使用我的应用程序。我如何将他们的产品分开?我在想

products = new SimpleSchema({
  name: String,
  price: Number,
  company: String
})

仅订阅用户公司匹配的产品。然而,这感觉很笨拙,并且有可能为用户发布错误的产品。在Meteor中有没有更好的方法可以做到这一点?

您可能想看一看。谢谢,这可能是我需要的。