Skip to content

Commit

Permalink
models revisited
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya-Thakur committed Jan 9, 2021
1 parent e33f59a commit d588cf8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
23 changes: 11 additions & 12 deletions models/response.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,25 @@ var responseSchema = new mongoose.Schema({
type: Date
},
answer: {
type: Array
}
});

var answerList = new mongoose.Schema({
type: [
{
questionContent : {
type: Date
},
userResponse : {
type: String
},
optionList : {
type: Array
type: [
{
value : {
type: String
}
}
]
}

});

var option = new mongoose.Schema({
value : {
type: String
}
]
}
});

Expand Down
39 changes: 19 additions & 20 deletions models/survey.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,25 @@ var surveySchema = new mongoose.Schema({
type: Boolean
},
question: {
type: Array
}
});

var questionList = new mongoose.Schema({
questionType : {
type: String
},
questionContent : {
type: Date
},
optionList : {
type: Array
}

});

var option = new mongoose.Schema({
value : {
type: String
type: [
{
questionType : {
type: String
},
questionContent : {
type: Date
},
optionList : {
type: [
{
value : {
type: String
}
}
]
}
}
]
}
});

Expand Down

0 comments on commit d588cf8

Please sign in to comment.