Renamed the 'user_id' column into 'author' & added a ref to the 'users' schema
This commit is contained in:
parent
79d598002f
commit
075f8764d7
@ -36,8 +36,9 @@ const AddonSchema = new mongoose.Schema({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
},
|
},
|
||||||
user_id: { // The id of the author
|
author: { // The author
|
||||||
type: mongoose.mongo.ObjectId,
|
type: mongoose.mongo.ObjectId,
|
||||||
|
ref: 'users',
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
price: Number // The price needed to pay for the addon
|
price: Number // The price needed to pay for the addon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user