mirror of
https://github.com/KevinMidboe/ISPDowntimeMonitor.git
synced 2026-02-03 15:06:36 +00:00
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:
11
src/schemas/Event.js
Normal file
11
src/schemas/Event.js
Normal 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);
|
||||
Reference in New Issue
Block a user