|
@@ -7,8 +7,24 @@ import (
|
|
|
)
|
|
|
|
|
|
type ExamHistory struct {
|
|
|
- Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
|
|
|
- UserId string `bson:"userId,omitempty" json:"userId"`
|
|
|
- Content string `bson:"content,omitempty" json:"content"`
|
|
|
- CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
|
|
|
+ Id primitive.ObjectID `bson:"_id" json:"_id"`
|
|
|
+ UserId string `bson:"userId" json:"userId"`
|
|
|
+ // $title:正确/错误
|
|
|
+ ExamRecord []map[string]string `bson:"userId" json:"examRecord"`
|
|
|
+ TotalScore float64 `bson:"userId" json:"totalScore"`
|
|
|
+ Correct int `bson:"userId" json:"correct"`
|
|
|
+ Mistake int `bson:"userId" json:"mistake"`
|
|
|
+ CreateTime time.Time `bson:"createTime" json:"createTime"`
|
|
|
}
|
|
|
+
|
|
|
+// {
|
|
|
+// "userId": "xxx",
|
|
|
+// "examRecord": [
|
|
|
+// {"titlexxxx1":"正确"},
|
|
|
+// {"titlexxxx2":"错误"}
|
|
|
+// ],
|
|
|
+// "totalScore": 93.5,
|
|
|
+// "correct": 18,
|
|
|
+// "mistake": 2,
|
|
|
+// "createTime": "2023-05-16T01:57:52.017Z"
|
|
|
+// }
|