questions.js
799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
const mongoose = require('mongoose');
const schema = mongoose.Schema;
const questionSchema = new schema({
/**
* 질문 폼
* 번호 질문내용 답1 답2 가중치1, 가중치2
*/
num:{
type: Number,
default: -1
},
question: {
type: String,
default: "질문",
},
answer1: {
type: String,
default: "그렇다"
},
answer2: {
type: String,
default: "아니다"
},
fight: {
type: Number,
default: 0,
},
detail: {
type: Number,
default: 0,
},
traffic: {
type: Number,
default: 0,
},
control: {
type: Number,
default: 0,
},
support: {
type: Number,
default: 0,
},
activity: {
type: Number,
default: 0,
},
});
module.exports = mongoose.model('question', questionSchema);