Added posts and categories

This commit is contained in:
Johnathon Slightham
2021-05-17 23:54:14 -04:00
parent 3e681bcf9b
commit fb799fa001
9 changed files with 354 additions and 2 deletions

16
category.model.js Normal file
View File

@@ -0,0 +1,16 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
// Database schema for an email message
let Category = new Schema({
name: {
type: String
},
color: {
type: String
},
}, {
collection: 'categories'
});
module.exports = mongoose.model('Category', Category);