数据模型 考试功能 青云知识库

黄鹏宇 420 2021-11-17

说明

  1. 本文中PO代表持久层对象, Persistent Object,一个PO对应数据库中的一条记录
  2. BO即业务对象,business object,把业务逻辑封装为一个对象,这个对象可以包括一个或多个其它的对象,本文中以json格式表示

一、学生添加考试 QuizExamAdd

1. PO

** exam_add **
image.png

2. BO

{
        "id": 9,
        "isOwner": false,
        "teacherName": "黄鹏宇",
        "title": "考试结束,没参加考试",
        "score": 0,
        "finishAns": false,
        "startDate": 1636966800000,
        "duration": 30,
        "finishJudge": false,
        "allowEnterCount": 3,
        "enterCount": 6,
        "createTime": 1636939800000,
      }

二、考试配置 QuizExam

1. PO

① 考试配置本体 exam

image.png

② 分数线 exam_score_line

image.png

2. BO

{
    "examDuration":null,
    "examTitle":"",
    "examPwd":null,
    "quesList":[
    
    ],
    "scoreLine":[90,80,60],
    "scoreLineName":["优秀","良好","及格"],
    "canExitAndSave":false,
    "switchScreenCount":1,
    "canSwitchScreen":false,
    "startExamDate":"2021-11-17 12:53:42",
    "hasStorage":true
}

三、题目 QuizQues

1. PO

① 题目本体 quiz_ques

image.png

② 附件 quiz_ques_file

image.png

② 附件类型(用于区分题目,评论,选项)quiz_file_type

image.png

③ 类型 quiz_ques_type

image.png

④ 选项 quiz_ques_option

image.png

2. BO

    [{
            "title":"单选题标题",
            "type":"单选题",
	    "index":0,
            "score":1,
            "files":[

            ],
            "answer":[
                "0"
            ],
            "options":[
                {
                    "id":0,
                    "body":"123"
                }
            ],
            "desc":"长按序号排序,长按题目编辑,左滑删除,点击预览",
            "show_delete":false
        },
        {
            "title":"填空题标题",
            "type":"填空题",
            "score":1,
	    "index":0,
            "files":[
                {
                    "fileType":"image",
                    "url":"http://tmp/QMk0GQjFUJoOe4175cedfccf29afa4891788d1a7abee.png",
                    "size":8911,
                    "sort":0
                }
            ],
            "answer":[
                "123",
                "456"
            ],
            "options":[
                {
                    "id":0,
                    "body":"123"
                },
                {
                    "id":1,
                    "body":"456"
                }
            ],
            "desc":"长按序号排序,长按题目编辑,左滑删除,点击预览"
        }]

四、答题卡 QuizExamAnsCard

每拉取一次考试数据,就会生成一张答题卡,提交时上传。
如果有多张表,则取最后一张

1. PO

exam_anscard
image.png

exam_submit_type

交卷的原因
image.png

2. BO

五、考试作答记录 QuizExamQuesSubmitRec

学生交卷时,提交的答题记录

1. PO

exam_ques_submit_rec
image.png

2. BO