Refactor utils and organize routes/schema
This commit is contained in:
19
schema/session.model.js
Normal file
19
schema/session.model.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
// Database schema for a session
|
||||
let Session = new Schema({
|
||||
userId: {
|
||||
type: String
|
||||
},
|
||||
sessionId: {
|
||||
type: String
|
||||
},
|
||||
date: {
|
||||
type: Date
|
||||
}
|
||||
}, {
|
||||
collection: 'sessions'
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Session', Session);
|
||||
Reference in New Issue
Block a user