Db functions and event Schema w/ mongoose.

Create mongoose schema for Event and db.js to export ways we want to
interface with the database.
This commit is contained in:
2020-06-03 00:18:32 +02:00
committed by KevinMidboe
parent 7fd5a5b049
commit 9cc4218bf2
2 changed files with 44 additions and 0 deletions

11
src/schemas/Event.js Normal file
View File

@@ -0,0 +1,11 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const Event = new Schema({
date: Date,
isOk: Boolean,
message: String,
pdfFilename: String
})
module.exports = mongoose.model('Event', Event);