先更新1版记录下

This commit is contained in:
2026-04-16 11:30:30 +08:00
parent ead8e2edd5
commit 2f2d796e30
40 changed files with 393714 additions and 4071 deletions

View File

@@ -1,35 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" modified="2026-04-14T10:44:00.000Z" agent="Oz" version="24.7.17">
<diagram id="grading-er" name="ER图">
<mxGraphModel dx="1800" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1800" pageHeight="1200" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="2" value="03 批改与反馈 - ER图不含AI实现细节" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=22;fontStyle=1;" parent="1" vertex="1">
<mxGeometry x="20" y="20" width="560" height="30" as="geometry"/>
</mxCell>
<mxCell id="10" value="gd_grading_task&lt;br&gt;PK grading_task_id&lt;br&gt;FK submission_id -&gt; hw_submission.submission_id&lt;br&gt;status(PENDING/RUNNING/WAIT_REVIEW/DONE)&lt;br&gt;trigger_source, tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1"><mxGeometry x="40" y="120" width="330" height="140" as="geometry"/></mxCell>
<mxCell id="11" value="gd_grading_rule_set&lt;br&gt;PK rule_set_id&lt;br&gt;rule_version, subject_code, objective_policy&lt;br&gt;subjective_policy(manual_first)&lt;br&gt;tenant_id, enabled" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1"><mxGeometry x="400" y="120" width="320" height="130" as="geometry"/></mxCell>
<mxCell id="12" value="gd_objective_score&lt;br&gt;PK objective_score_id&lt;br&gt;FK grading_task_id -&gt; gd_grading_task.grading_task_id&lt;br&gt;FK answer_id -&gt; hw_submission_answer.answer_id&lt;br&gt;score, matched_rule, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1"><mxGeometry x="750" y="120" width="340" height="140" as="geometry"/></mxCell>
<mxCell id="13" value="gd_subjective_review&lt;br&gt;PK review_id&lt;br&gt;FK grading_task_id -&gt; gd_grading_task.grading_task_id&lt;br&gt;FK answer_id -&gt; hw_submission_answer.answer_id&lt;br&gt;reviewer_id, review_score, status, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1"><mxGeometry x="1120" y="120" width="350" height="140" as="geometry"/></mxCell>
<mxCell id="14" value="gd_score_summary&lt;br&gt;PK summary_id&lt;br&gt;FK grading_task_id -&gt; gd_grading_task.grading_task_id&lt;br&gt;total_score, grade_level(A/B/C)&lt;br&gt;surpass_ratio, used_seconds, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1"><mxGeometry x="40" y="300" width="330" height="140" as="geometry"/></mxCell>
<mxCell id="15" value="gd_error_tag&lt;br&gt;PK error_tag_id&lt;br&gt;tag_code, tag_name&lt;br&gt;category(审题/计算/概念)&lt;br&gt;tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1"><mxGeometry x="400" y="300" width="300" height="130" as="geometry"/></mxCell>
<mxCell id="16" value="gd_answer_error_rel&lt;br&gt;PK (answer_id, error_tag_id)&lt;br&gt;FK answer_id -&gt; hw_submission_answer.answer_id&lt;br&gt;FK error_tag_id -&gt; gd_error_tag.error_tag_id&lt;br&gt;confidence, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1"><mxGeometry x="730" y="300" width="330" height="130" as="geometry"/></mxCell>
<mxCell id="17" value="gd_wrong_question&lt;br&gt;PK wrong_question_id&lt;br&gt;FK student_id -&gt; tb_sys_user.user_id&lt;br&gt;FK question_id -&gt; hw_question_item.question_id&lt;br&gt;source_submission_id, mastery_status&lt;br&gt;review_count, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1"><mxGeometry x="1090" y="300" width="350" height="150" as="geometry"/></mxCell>
<mxCell id="18" value="gd_review_plan&lt;br&gt;PK review_plan_id&lt;br&gt;FK wrong_question_id -&gt; gd_wrong_question.wrong_question_id&lt;br&gt;plan_date, plan_stage(E1/E2/E3)&lt;br&gt;status, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1"><mxGeometry x="40" y="490" width="330" height="130" as="geometry"/></mxCell>
<mxCell id="19" value="gd_teacher_comment&lt;br&gt;PK comment_id&lt;br&gt;FK review_id -&gt; gd_subjective_review.review_id&lt;br&gt;comment_type(text/voice), content_ref&lt;br&gt;reviewer_id, tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1"><mxGeometry x="400" y="490" width="340" height="130" as="geometry"/></mxCell>
<mxCell id="20" value="设计方法与原因&lt;br&gt;1) 批改任务聚合承接状态机,保证流程一致性&lt;br&gt;2) 客观分与主观复核拆表,支持并行与补录&lt;br&gt;3) 错因标签与错题沉淀解耦,便于策略演进&lt;br&gt;4) 仅保留 GradingEnginePort 抽象不绑定AI实现" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" parent="1" vertex="1">
<mxGeometry x="780" y="500" width="660" height="130" as="geometry"/>
</mxCell>
<mxCell id="100" value="N:1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;" parent="1" source="10" target="11" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="101" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;" parent="1" source="12" target="10" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="102" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;" parent="1" source="13" target="10" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="103" value="1:1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;" parent="1" source="14" target="10" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="104" value="M:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;" parent="1" source="16" target="15" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="105" value="衍生" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;" parent="1" source="17" target="14" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="106" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;" parent="1" source="18" target="17" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="107" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;" parent="1" source="19" target="13" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
<mxfile host="65bd71144e">
<diagram id="grading-er-v2" name="ER图">
<mxGraphModel dx="1312" dy="773" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1800" pageHeight="1200" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="2" value="03 批改与反馈 - ER图question单schema含知识点分析与AI同步" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=22;fontStyle=1;" parent="1" vertex="1">
<mxGeometry x="20" y="20" width="560" height="30" as="geometry"/>
</mxCell>
<mxCell id="3" value="说明:批改与反馈表统一在 question/10_create_question_tables.sql 中定义" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=12;fontColor=#666666;" parent="1" vertex="1">
<mxGeometry x="20" y="52" width="900" height="24" as="geometry"/>
</mxCell>
<mxCell id="10" value="question.gd_grading_task&lt;br&gt;PK grading_task_id&lt;br&gt;FK submission_id -&gt; hw_submission.submission_id&lt;br&gt;paper_id, task_status, trigger_source&lt;br&gt;tenant_id, created_at, updated_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="25" y="110" width="330" height="140" as="geometry"/>
</mxCell>
<mxCell id="11" value="question.gd_answer_grade&lt;br&gt;PK answer_grade_id&lt;br&gt;FK grading_task_id -&gt; gd_grading_task.grading_task_id&lt;br&gt;FK answer_id -&gt; hw_submission_answer.answer_id&lt;br&gt;grade_mode, grade_status, score, grader_id&lt;br&gt;evidence_json, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="420" y="90" width="360" height="150" as="geometry"/>
</mxCell>
<mxCell id="12" value="question.gd_score_summary&lt;br&gt;PK summary_id&lt;br&gt;UK grading_task_id -&gt; gd_grading_task.grading_task_id&lt;br&gt;total_score, grade_level, surpass_ratio, used_seconds&lt;br&gt;tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="830" y="90" width="340" height="140" as="geometry"/>
</mxCell>
<mxCell id="13" value="question.gd_error_tag&lt;br&gt;PK error_tag_id&lt;br&gt;tag_code, tag_name, category&lt;br&gt;tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="40" y="300" width="300" height="120" as="geometry"/>
</mxCell>
<mxCell id="14" value="question.gd_answer_error_rel&lt;br&gt;PK (answer_id, error_tag_id)&lt;br&gt;FK answer_id -&gt; hw_submission_answer.answer_id&lt;br&gt;FK error_tag_id -&gt; gd_error_tag.error_tag_id&lt;br&gt;confidence, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="390" y="300" width="350" height="130" as="geometry"/>
</mxCell>
<mxCell id="15" value="question.gd_wrong_question&lt;br&gt;PK wrong_question_id&lt;br&gt;student_id, question_id, source_submission_id&lt;br&gt;mastery_status, review_count&lt;br&gt;tenant_id, created_at, updated_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="790" y="290" width="350" height="140" as="geometry"/>
</mxCell>
<mxCell id="16" value="question.gd_review_plan&lt;br&gt;PK review_plan_id&lt;br&gt;FK wrong_question_id -&gt; gd_wrong_question.wrong_question_id&lt;br&gt;plan_date, plan_stage, plan_status&lt;br&gt;tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="1190" y="290" width="340" height="130" as="geometry"/>
</mxCell>
<mxCell id="17" value="question.gd_teacher_comment&lt;br&gt;PK comment_id&lt;br&gt;FK answer_grade_id -&gt; gd_answer_grade.answer_grade_id&lt;br&gt;reviewer_id, comment_type, content_ref&lt;br&gt;tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1">
<mxGeometry x="420" y="480" width="350" height="130" as="geometry"/>
</mxCell>
<mxCell id="18" value="question.gd_explanation_submission&lt;br&gt;PK explanation_id&lt;br&gt;student_id, wrong_question_id, source_answer_id&lt;br&gt;audio_file_id, transcript_text, submission_status&lt;br&gt;tenant_id, created_at, updated_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="40" y="500" width="340" height="150" as="geometry"/>
</mxCell>
<mxCell id="19" value="question.gd_explanation_assessment&lt;br&gt;PK assessment_id&lt;br&gt;UK explanation_id -&gt; gd_explanation_submission.explanation_id&lt;br&gt;evaluator_type, total_score, pass_status&lt;br&gt;improvement_suggestion, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="830" y="500" width="360" height="140" as="geometry"/>
</mxCell>
<mxCell id="20" value="question.gd_explanation_dimension_score&lt;br&gt;PK dimension_score_id&lt;br&gt;FK assessment_id -&gt; gd_explanation_assessment.assessment_id&lt;br&gt;dimension_code, dimension_name&lt;br&gt;score, weight, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="1240" y="500" width="340" height="140" as="geometry"/>
</mxCell>
<mxCell id="23" value="question.gd_answer_kp_analysis&lt;br&gt;PK analysis_id&lt;br&gt;FK answer_id -&gt; hw_submission_answer.answer_id&lt;br&gt;FK kp_id -&gt; cl_knowledge_point.kp_id&lt;br&gt;correctness, mastery_score, confidence&lt;br&gt;evidence_json, tenant_id, updated_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="1240" y="90" width="360" height="160" as="geometry"/>
</mxCell>
<mxCell id="21" value="upms.tb_sys_message&lt;br&gt;PK message_id&lt;br&gt;message_type, biz_type, content_object_id&lt;br&gt;web_jump_url, tenant_id, send_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="40" y="710" width="330" height="120" as="geometry"/>
</mxCell>
<mxCell id="22" value="upms.tb_sys_message_recipient&lt;br&gt;PK (message_id, recipient_user_id)&lt;br&gt;FK message_id -&gt; tb_sys_message.message_id&lt;br&gt;read_status, read_at, clicked_at&lt;br&gt;tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="430" y="710" width="360" height="120" as="geometry"/>
</mxCell>
<mxCell id="24" value="外部同步依赖ai&lt;br&gt;ai.tb_ai_knowledge_file&lt;br&gt;ai.tb_ai_knowledge_sync_task&lt;br&gt;ai.tb_ai_graph_entity / ai.tb_ai_graph_relation&lt;br&gt;Target: Milvus + NebulaGraph/Neo4j" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="820" y="710" width="360" height="150" as="geometry"/>
</mxCell>
<mxCell id="30" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="10" target="11" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="31" value="1:1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="10" target="12" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="32" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="13" target="14" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="33" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="12" target="15" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="34" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="15" target="16" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="35" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="11" target="17" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="36" value="1:1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="18" target="19" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="37" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="19" target="20" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="38" value="触发通知" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="11" target="21" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="39" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="21" target="22" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="40" value="1:N" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jettySize=auto;html=1;endArrow=block;endFill=1;exitPerimeter=1;entryPerimeter=1;" parent="1" source="11" target="23" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>