Spaces:
Running
Running
| const { ObjectId } = require("bson"); | |
| const { default: mongoose } = require("mongoose"); | |
| const Schema = mongoose.Schema; | |
| const userSchema = new Schema({ | |
| QuestionNumber: { | |
| type: Number, | |
| default: 1, | |
| unique: true, | |
| autoIncrement: true | |
| }, | |
| 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("Question", userSchema); |