Renamed the 'user_id' column into 'author' & added a ref to the 'users' schema

This commit is contained in:
Mathias Wagner 2022-07-09 17:35:38 +02:00
parent 79d598002f
commit 075f8764d7
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -36,8 +36,9 @@ const AddonSchema = new mongoose.Schema({
type: Number,
default: 0
},
user_id: { // The id of the author
author: { // The author
type: mongoose.mongo.ObjectId,
ref: 'users',
required: true
},
price: Number // The price needed to pay for the addon