JJuOn

Add a new column to problem model

...@@ -8,6 +8,7 @@ const ProblemSchema=new Schema({ ...@@ -8,6 +8,7 @@ const ProblemSchema=new Schema({
8 solvedacLevel: {type: Number}, 8 solvedacLevel: {type: Number},
9 sumbitNum: {type: Number, required: true}, 9 sumbitNum: {type: Number, required: true},
10 correctNum: {type: Number, required: true}, 10 correctNum: {type: Number, required: true},
11 + count: { type: Number },
11 category: {type:[String]} 12 category: {type:[String]}
12 }); 13 });
13 14
...@@ -46,6 +47,10 @@ ProblemSchema.methods.getCorrectNum=function(){ ...@@ -46,6 +47,10 @@ ProblemSchema.methods.getCorrectNum=function(){
46 return this.correctNum; 47 return this.correctNum;
47 } 48 }
48 49
50 +ProblemSchema.methods.getCount=function(){
51 + return this.count;
52 +}
53 +
49 ProblemSchema.methods.getCategory=function(){ 54 ProblemSchema.methods.getCategory=function(){
50 return this.category; 55 return this.category;
51 } 56 }
......