Refactor utils and organize routes/schema
This commit is contained in:
19
schema/message.model.js
Normal file
19
schema/message.model.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
// Database schema for an email message
|
||||
let Message = new Schema({
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
subject: {
|
||||
type: String
|
||||
},
|
||||
body: {
|
||||
type: String
|
||||
}
|
||||
}, {
|
||||
collection: 'messages'
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Message', Message);
|
||||
Reference in New Issue
Block a user