I want to create a system where multiple contracts can be created belonging to different users.
In Django, Ruby, etc., I would create a model Contract
with field user = models.ForeignKey(settings.AUTH_USER_MODEL)
but I don't know how to do this in Meteor.
Is it better to make a schema with
Schema.User = new SimpleSchema({
contracts: {
type: [Object],
},
"contracts.$.start_date": {
type: Date,
},
"contracts.$.end_date": {
type: Date,
},
"contracts.$.salary": {
type: Number,
}
});
or something like that? And then use meteor-autoform
to create these? It seems very difficult to make objects relational in Meteor.