Spaces:
Running
Running
| const { ObjectId } = require("bson"); | |
| const { default: mongoose } = require("mongoose"); | |
| const Schema = mongoose.Schema; | |
| const userSchema = new Schema({ | |
| TeamID: { | |
| type: ObjectId, | |
| required: true, | |
| ref: "Team" | |
| }, | |
| QuestionID: { | |
| type: ObjectId, | |
| required: true, | |
| ref: "Question" | |
| }, | |
| QuestionNumber: { | |
| type: Number, | |
| }, | |
| Question: { | |
| type: String | |
| }, | |
| Description: { | |
| type: String, | |
| }, | |
| Answer: { | |
| type: String | |
| }, | |
| Hint: { | |
| type: String, | |
| }, | |
| HintAddress: { | |
| type: Number | |
| }, | |
| num: { | |
| type: Number, | |
| }, | |
| Round: { | |
| type: Number, | |
| }, | |
| Points: { | |
| type: Number, | |
| }, | |
| RoomID: { | |
| type: Number, | |
| }, | |
| assigned: { | |
| type: Boolean, | |
| default: false, | |
| } | |
| }); | |
| module.exports = mongoose.model("UserQuestion", userSchema); |