|
@@ -7,12 +7,17 @@ import (
|
|
|
)
|
|
|
|
|
|
type ExamHistory struct {
|
|
|
- Id primitive.ObjectID `bson:"_id" json:"_id"`
|
|
|
- UserId string `bson:"userId" json:"userId"`
|
|
|
+ Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
|
|
|
+ UserId string `bson:"userId,omitempty" json:"userId"`
|
|
|
// $title:正确/错误
|
|
|
- ExamRecord []map[string]string `bson:"examRecord" json:"examRecord"`
|
|
|
- TotalScore float64 `bson:"totalScore" json:"totalScore"`
|
|
|
- Correct int `bson:"correct" json:"correct"`
|
|
|
- Mistake int `bson:"mistake" json:"mistake"`
|
|
|
- CreateTime time.Time `bson:"createTime" json:"createTime"`
|
|
|
+ ExamRecord []*Record `bson:"examRecord,omitempty" json:"examRecord"`
|
|
|
+ TotalScore float64 `bson:"totalScore,omitempty" json:"totalScore"`
|
|
|
+ Correct int `bson:"correct,omitempty" json:"correct"`
|
|
|
+ Mistake int `bson:"mistake,omitempty" json:"mistake"`
|
|
|
+ CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
|
|
|
+}
|
|
|
+
|
|
|
+type Record struct {
|
|
|
+ Title string `bson:"title,omitempty" json:"title"`
|
|
|
+ Result string `bson:"result,omitempty" json:"result"`
|
|
|
}
|