diff options
author | lowercasename <raphaelkabo@gmail.com> | 2019-10-01 00:32:31 +0100 |
---|---|---|
committer | lowercasename <raphaelkabo@gmail.com> | 2019-10-01 00:32:31 +0100 |
commit | 0c46e2d2d148efb7cfabcf82c12266a8d788f551 (patch) | |
tree | b1a2b9f5aa4dfa543a965b1d7886f4f133d63a54 /models/EventGroup.js | |
parent | f04431e5b29b86b7439e41d40ae5a23a13ddd488 (diff) | |
parent | 40ade71e0019bbb59710a2e2e5d74197c47cb1b0 (diff) |
Merge branch 'master' of https://github.com/lowercasename/gathio
Diffstat (limited to 'models/EventGroup.js')
-rwxr-xr-x | models/EventGroup.js | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/models/EventGroup.js b/models/EventGroup.js new file mode 100755 index 0000000..336074c --- /dev/null +++ b/models/EventGroup.js @@ -0,0 +1,49 @@ +const mongoose = require('mongoose'); + +const EventGroupSchema = new mongoose.Schema({ + id: { + type: String, + required: true, + unique: true + }, + name: { + type: String, + trim: true, + required: true + }, + description: { + type: String, + trim: true, + required: true + }, + image: { + type: String, + trim: true + }, + url: { + type: String, + trim: true + }, + creatorEmail: { + type: String, + trim: true + }, + hostName: { + type: String, + trim: true + }, + editToken: { + type: String, + trim: true, + minlength: 32, + maxlength: 32 + }, + firstLoad: { + type: Boolean, + trim: true, + default: true + }, + events: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Event' }] +}); + +module.exports = mongoose.model('EventGroup', EventGroupSchema); |