diff options
author | eug-vs <eug-vs@keemail.me> | 2020-12-04 00:54:07 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-12-04 00:54:07 +0300 |
commit | a79e87296271a2891594a1ab11d746fdd875c928 (patch) | |
tree | 83ce7d7400abe4bea0813c2f8762f801e5128b5b /src/services/events/models.js | |
parent | 778f614a8eb753529c02d71e49486846391f0a3f (diff) | |
download | bsu-fantom-a79e87296271a2891594a1ab11d746fdd875c928.tar.gz |
refactor: migrate to mongo-cronjob
Diffstat (limited to 'src/services/events/models.js')
-rw-r--r-- | src/services/events/models.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/services/events/models.js b/src/services/events/models.js new file mode 100644 index 0000000..99dada1 --- /dev/null +++ b/src/services/events/models.js @@ -0,0 +1,16 @@ +const mongoose = require('mongoose'); +const { Client } = require('mongo-cronjob'); +const { getConnection } = require('../../connectDb.js'); + +const contextSchema = new mongoose.Schema({ + participants: [String], + attendanceId: String, + conferenceId: String +}); + +const connection = mongoose.connection; +const client = new Client(connection, contextSchema); + + +module.exports = client; + |