1234567891011121314151617181920212223242526272829 |
- package model
- import (
- "time"
- "go.mongodb.org/mongo-driver/bson/primitive"
- )
- type ExeamLog struct {
- Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
- Cid string `bson:"cid,omitempty" json:"cid"` // 分类id
- Uid string `bson:"uid,omitempty" json:"uid"` // 用户id
- Title string `bson:"title,omitempty" json:"title"` // 考核标题
- Type string `bson:"type,omitempty" json:"type"` // 考核类型: 理论/实操
- Correct *int `bson:"correct,omitempty" json:"correct"` // 正确题目数
- Error *int `bson:"error,omitempty" json:"error"` // 错误题目数
- TotalScore *int `bson:"totalScore,omitempty" json:"totalScore"` // 总分
- ExeamResult map[string][]*TestRecord `bson:"exeamResult,omitempty" json:"exeamResult"` // 考核结果/ choiceQuestion:[{}] judgeQuestion:[{}]
- // 成绩
- Score *int `bson:"score,omitempty" json:"score"` // 分数
- CompleteRate *int `bson:"completeRate,omitempty" json:"completeRate"` // 完成进度
- CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
- UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
- }
- type TestRecord struct {
- Test
- ExeamAnswer string `bson:"exeamAnswer,omitempty" json:"exeamAnswer"` // 答案
- }
|