2026-04-16 11:30:30 +08:00
|
|
|
|
<mxfile host="app.diagrams.net" modified="2026-04-15T07:43:00.000Z" agent="Oz" version="24.7.17">
|
|
|
|
|
|
<diagram id="homework-er-v2" name="ER图">
|
2026-04-14 21:13:29 +08:00
|
|
|
|
<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"/>
|
2026-04-16 11:30:30 +08:00
|
|
|
|
<mxCell id="2" value="02 习题与作业 - ER图(question单schema:10_create + 20_init)" 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="520" height="30" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
2026-04-16 15:46:29 +08:00
|
|
|
|
<mxCell id="3" value="说明:question 目录仅保留 2 个 SQL 文件(10_create_question_tables.sql / 20_init_question_seed.sql),推荐 rc_* 表已并入 question schema" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=12;fontColor=#666666;" parent="1" vertex="1">
|
2026-04-16 11:30:30 +08:00
|
|
|
|
<mxGeometry x="20" y="52" width="1100" height="24" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
|
|
|
|
|
<mxCell id="10" value="question.hw_question_bank<br>PK bank_id<br>bank_name, subject_code, grade_code, status<br>tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
|
|
|
|
|
|
<mxGeometry x="40" y="90" width="270" height="120" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
2026-04-16 15:46:29 +08:00
|
|
|
|
<mxCell id="11" value="question.hw_question_item<br>PK question_id<br>question_type, stem, stem_json, difficulty<br>answer_payload, analysis, scoring_rule_json<br>question_status, tenant_id, created_at, updated_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
|
2026-04-16 11:30:30 +08:00
|
|
|
|
<mxGeometry x="350" y="80" width="380" height="170" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
2026-04-16 15:46:29 +08:00
|
|
|
|
<mxCell id="20" value="question.hw_bank_question_rel<br>PK (bank_id, question_id)<br>FK bank_id -> hw_question_bank.bank_id<br>FK question_id -> hw_question_item.question_id<br>question_order, source_type, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
|
|
|
|
|
|
<mxGeometry x="350" y="260" width="380" height="120" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
2026-04-16 11:30:30 +08:00
|
|
|
|
<mxCell id="12" value="question.hw_question_kp_rel<br>PK (question_id, kp_id)<br>FK question_id -> hw_question_item.question_id<br>FK kp_id -> cl_knowledge_point.kp_id<br>relation_type, confidence, graph_relation_id, source_table/source_pk<br>tenant_id, updated_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
|
|
|
|
|
|
<mxGeometry x="780" y="90" width="320" height="130" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
|
|
|
|
|
<mxCell id="21" value="外部同步依赖(ai)<br>ai.tb_ai_knowledge_file<br>ai.tb_ai_knowledge_sync_task<br>ai.tb_ai_graph_entity / ai.tb_ai_graph_relation<br>Target: Milvus + NebulaGraph/Neo4j" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" vertex="1">
|
|
|
|
|
|
<mxGeometry x="40" y="890" width="370" height="150" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
2026-04-16 15:46:29 +08:00
|
|
|
|
<mxCell id="13" value="question.hw_paper<br>PK paper_id<br>paper_name, paper_type, subject_code, total_score<br>source_file_id, grading_policy_json<br>tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1">
|
2026-04-16 11:30:30 +08:00
|
|
|
|
<mxGeometry x="40" y="300" width="290" height="130" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
|
|
|
|
|
<mxCell id="14" value="question.hw_paper_question<br>PK (paper_id, question_id)<br>question_order, score, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
|
|
|
|
|
|
<mxGeometry x="380" y="320" width="310" height="120" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
2026-04-16 15:46:29 +08:00
|
|
|
|
<mxCell id="15" value="question.hw_assignment<br>PK assignment_id<br>FK paper_id -> hw_paper.paper_id<br>assignment_mode, title, publish_time, deadline, status<br>tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
|
2026-04-16 11:30:30 +08:00
|
|
|
|
<mxGeometry x="740" y="300" width="340" height="140" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
|
|
|
|
|
<mxCell id="16" value="question.hw_assignment_target<br>PK target_id<br>FK assignment_id -> hw_assignment.assignment_id<br>target_type, target_ref_id, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
|
|
|
|
|
|
<mxGeometry x="1130" y="300" width="320" height="130" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
2026-04-16 15:46:29 +08:00
|
|
|
|
<mxCell id="17" value="question.hw_submission<br>PK submission_id<br>FK assignment_id -> hw_assignment.assignment_id<br>FK student_id -> tb_sys_user.user_id<br>submission_mode, origin_file_id, submit_time<br>used_seconds, status, tenant_id" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1">
|
2026-04-16 11:30:30 +08:00
|
|
|
|
<mxGeometry x="740" y="500" width="360" height="150" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
|
|
|
|
|
<mxCell id="18" value="question.hw_submission_answer<br>PK answer_id<br>FK submission_id -> hw_submission.submission_id<br>FK question_id -> hw_question_item.question_id<br>answer_type, answer_payload<br>file_id, file_type, tenant_id<br>UK (submission_id, question_id)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1">
|
|
|
|
|
|
<mxGeometry x="1140" y="500" width="390" height="170" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
|
|
|
|
|
<mxCell id="19" value="upms.tb_sys_file<br>PK file_id<br>media_type, object_key, file_hash<br>uploaded_by, tenant_id, created_at" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
|
|
|
|
|
|
<mxGeometry x="1140" y="730" width="320" height="120" as="geometry"/>
|
|
|
|
|
|
</mxCell>
|
2026-04-16 15:46:29 +08:00
|
|
|
|
<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="20" 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="11" target="20" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
|
2026-04-16 11:30:30 +08:00
|
|
|
|
<mxCell id="31" 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="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="11" target="14" 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="13" target="15" 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="15" target="16" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
|
|
|
|
<mxCell id="36" 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="17" 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="17" target="18" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
|
|
|
|
<mxCell id="38" 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="18" edge="1"><mxGeometry relative="1" as="geometry"/></mxCell>
|
2026-04-14 21:13:29 +08:00
|
|
|
|
</root>
|
|
|
|
|
|
</mxGraphModel>
|
|
|
|
|
|
</diagram>
|
|
|
|
|
|
</mxfile>
|