Added posts and categories
This commit is contained in:
16
category.model.js
Normal file
16
category.model.js
Normal 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);
|
||||
Reference in New Issue
Block a user