diff options
author | eug-vs <eug-vs@keemail.me> | 2020-11-27 22:41:25 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-11-27 22:41:25 +0300 |
commit | 9f7115217c34732753102e044a94711400b5affc (patch) | |
tree | 364390decc2b093162ad740838c8add16d2955c7 /src/services/events/event.schema.js | |
parent | 6a4e4402a52c6649f0ffb1c6a1e9183caaf6e313 (diff) | |
download | bsu-fantom-9f7115217c34732753102e044a94711400b5affc.tar.gz |
feat: use cron to schedule jobs
Diffstat (limited to 'src/services/events/event.schema.js')
-rw-r--r-- | src/services/events/event.schema.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/services/events/event.schema.js b/src/services/events/event.schema.js new file mode 100644 index 0000000..0bbb978 --- /dev/null +++ b/src/services/events/event.schema.js @@ -0,0 +1,26 @@ +const { Schema, Types } = require('mongoose'); + +module.exports = new Schema({ + name: { + type: String, + required: true, + unique: true + }, + schedule: { + type: String, + required: true + }, + participants: { + type: [String], + default: [] + }, + status: { + type: String, + default: 'notStarted' + }, + conferenceId: String, + attendanceId: String, + nextRunAt: Date, + lastRunAt: Date +}, { timestamps: true }); + |