-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from kgpmask/treasure-hunt
Treasure Hunt: Test Build
- Loading branch information
Showing
22 changed files
with
1,917 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const mongoose = require('mongoose'); | ||
|
||
const locationSchema = new mongoose.Schema({ | ||
_id: { type: String, required: true }, | ||
name: { type: String, required: true }, | ||
pointerQuestion: [{ type: String, required: true }], | ||
code: { type: String, required: true }, | ||
questions: [ | ||
{ | ||
question: { type: String, required: true }, | ||
answer: { type: Number, required: true } | ||
} | ||
], | ||
keywords: [{ type: String, required: true }] | ||
}, { collection: 'locations' }); | ||
|
||
module.exports = mongoose.model('Location', locationSchema); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const mongoose = require('mongoose'); | ||
|
||
const riddleQuestionSchema = new mongoose.Schema({ | ||
_id: { type: String, required: true }, | ||
question: { type: String, required: true }, | ||
answer: { type: String, required: true } | ||
}, { collection: 'riddle-questions' }); | ||
|
||
module.exports = mongoose.model('RiddleQuestion', riddleQuestionSchema); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const mongoose = require('mongoose'); | ||
|
||
const teamSchema = new mongoose.Schema({ | ||
_id: { type: Number, required: true }, | ||
name: { type: String, required: true }, | ||
isAdmin: Boolean, | ||
password: { type: String, requred: true }, | ||
members: [ | ||
{ | ||
name: { type: String, required: true }, | ||
email: { type: String, required: true }, | ||
phone: { type: String, required: true } | ||
} | ||
], | ||
status: { type: String, required: true }, | ||
questionsAttempted: { type: Number, required: true, default: 0 }, | ||
order: [ | ||
{ | ||
location: { type: Number, required: true }, | ||
pointer: { type: Number, required: true }, | ||
question: { type: Number, required: true } | ||
} | ||
], | ||
timeout: { type: [Date, null] } | ||
}, { collection: 'event-teams' }); | ||
|
||
module.exports = mongoose.model('Team', teamSchema); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const mongoose = require('mongoose'); | ||
|
||
const sessionSchema = new mongoose.Schema({ | ||
_id: { type: String, required: true }, | ||
teamId: { type: Number, required: true }, | ||
timestamp: { type: Date, default: new Date() } | ||
}, { collection: 'team-session' }); | ||
|
||
module.exports = mongoose.model('TeamSession', sessionSchema); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.