const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const questionSchema = new mongoose.Schema({
questionType: {
type: Schema.Types.ObjectId,
ref:"questionType",
required: true
},
questionTitle: {
type: String,
required: true
},
question: {
type: String,
required: true
},
answer: {
type: Array,
required: true
},
createdBy: {
type: String,
required: true
},
}, {versionKey: false, timestamps: true});
module.exports = mongoose.model("question", questionSchema);