From 3c39da83e3c62c9e3eed701745f2a914dadcd6e9 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sun, 26 Jun 2022 17:04:49 +0200 Subject: [PATCH] Created the "bought items" model / schema --- models/BoughtItem.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 models/BoughtItem.js diff --git a/models/BoughtItem.js b/models/BoughtItem.js new file mode 100644 index 0000000..4534d6b --- /dev/null +++ b/models/BoughtItem.js @@ -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); \ No newline at end of file