Spaces:
Running
Running
const { ObjectId } = require("bson"); | |
const { default: mongoose } = require("mongoose"); | |
const Schema = mongoose.Schema; | |
const userSchema = new Schema({ | |
Round: { | |
type: Number, | |
}, | |
Questions: [{ | |
type: Schema.Types.ObjectId, | |
ref: "Question" | |
}] | |
}); | |
module.exports = mongoose.model("Room", userSchema); |