diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/Log.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/models/Log.js b/models/Log.js new file mode 100644 index 0000000..16875ee --- /dev/null +++ b/models/Log.js @@ -0,0 +1,12 @@ +const mongoose = require('mongoose') + +const logSchema = new mongoose.Schema({ + email: { type: String }, + action: { type: String, required: true }, + error: { type: String }, + created_at: { type: Date, default: Date.now }, +}) + +const Log = mongoose.models.Log || mongoose.model('Log', logSchema) + +export default Log |