I would like to design an inventory for a user. Basically,I try to create an inventory, with a user_id and a list of items with the number of each items.
There is the schema of my collection 'Item' :
var ItemSchema = new mongoose.Schema({
name: String,
image: String,
effects : {
attack: String,
defense: String,
life: String
}
});
I don't manage to design an inventory collection where I can easily update the number of each items and add new items.