diff options
author | BakedSnake <gilferrandm@gmail.com> | 2021-03-17 12:58:53 +0100 |
---|---|---|
committer | BakedSnake <gilferrandm@gmail.com> | 2021-03-17 12:58:53 +0100 |
commit | 188527c6b55a2d64d5f76c5d3e094da45c69b0c9 (patch) | |
tree | 8c6c41a2ffe04af81483ec36f72d328c3c76780a /models/cmmnt.js |
Diffstat (limited to 'models/cmmnt.js')
-rw-r--r-- | models/cmmnt.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/models/cmmnt.js b/models/cmmnt.js new file mode 100644 index 0000000..4373e8a --- /dev/null +++ b/models/cmmnt.js @@ -0,0 +1,15 @@ +const mongoose = require('mongoose'); + +//Schema Setup +const cmmntSchema = new mongoose.Schema({ + text: String, + author: { + id: { + type: mongoose.Schema.Types.ObjectId, + ref: 'User' + }, + username: String + } +}); + +module.exports = new mongoose.model('Cmmnt', cmmntSchema); |