Created the "bought items" model / schema
This commit is contained in:
parent
cdb3beef9b
commit
3c39da83e3
14
models/BoughtItem.js
Normal file
14
models/BoughtItem.js
Normal file
@ -0,0 +1,14 @@
|
||||
const mongoose = require('mongoose');
|
||||
|
||||
const BoughtItemSchema = new mongoose.Schema({
|
||||
user_id: { // The id of the user that bought the addon
|
||||
type: mongoose.mongo.ObjectId,
|
||||
required: true
|
||||
},
|
||||
addon_id: { // The id of the addon the user bought
|
||||
type: mongoose.mongo.ObjectId,
|
||||
required: true
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('bought_items', BoughtItemSchema);
|
Loading…
x
Reference in New Issue
Block a user