Created the "bought items" model / schema

This commit is contained in:
Mathias Wagner 2022-06-26 17:04:49 +02:00
parent cdb3beef9b
commit 3c39da83e3
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

14
models/BoughtItem.js Normal file
View 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);