Files
nursing-home/thesis/diagrams/class_diagram.drawio
2026-03-01 01:13:16 +08:00

59 lines
10 KiB
Plaintext

<mxfile>
<diagram name="系统类图" id="class-diagram">
<mxGraphModel dx="1100" dy="1100" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="tbl_user" value="&lt;b&gt;sys_user (用户表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;username VARCHAR(50)&lt;br&gt;password VARCHAR(100)&lt;br&gt;name VARCHAR(50)&lt;br&gt;phone VARCHAR(30)&lt;br&gt;role VARCHAR(20)&lt;br&gt;status TINYINT&lt;br&gt;created_at DATETIME&lt;br&gt;updated_at DATETIME&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="30" y="30" width="180" height="220" as="geometry"/>
</mxCell>
<mxCell id="tbl_elder" value="&lt;b&gt;elder (长者表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;name VARCHAR(50)&lt;br&gt;gender VARCHAR(10)&lt;br&gt;id_card VARCHAR(30)&lt;br&gt;birthday DATE&lt;br&gt;room_no VARCHAR(20)&lt;br&gt;check_in_date DATE&lt;br&gt;care_level VARCHAR(20)&lt;br&gt;status VARCHAR(20)&lt;br&gt;remark VARCHAR(200)&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="400" y="30" width="180" height="240" as="geometry"/>
</mxCell>
<mxCell id="tbl_family_elder" value="&lt;b&gt;family_elder (关联表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;family_id BIGINT FK&lt;br&gt;elder_id BIGINT FK&lt;br&gt;relationship VARCHAR(20)&lt;br&gt;created_at DATETIME&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="230" y="320" width="180" height="140" as="geometry"/>
</mxCell>
<mxCell id="tbl_schedule" value="&lt;b&gt;schedule (排班表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;nurse_id BIGINT FK&lt;br&gt;date DATE&lt;br&gt;shift VARCHAR(20)&lt;br&gt;task VARCHAR(200)&lt;br&gt;created_at DATETIME&lt;br&gt;updated_at DATETIME&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="30" y="320" width="180" height="180" as="geometry"/>
</mxCell>
<mxCell id="tbl_care" value="&lt;b&gt;care_record (护理记录表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;elder_id BIGINT FK&lt;br&gt;nurse_id BIGINT FK&lt;br&gt;content VARCHAR(500)&lt;br&gt;attachment_url VARCHAR(200)&lt;br&gt;record_time DATETIME&lt;br&gt;created_at DATETIME&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="30" y="560" width="200" height="180" as="geometry"/>
</mxCell>
<mxCell id="tbl_health" value="&lt;b&gt;health_record (健康记录表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;elder_id BIGINT FK&lt;br&gt;nurse_id BIGINT FK&lt;br&gt;temperature DECIMAL&lt;br&gt;bp_systolic INT&lt;br&gt;bp_diastolic INT&lt;br&gt;heart_rate INT&lt;br&gt;note VARCHAR(200)&lt;br&gt;record_time DATETIME&lt;br&gt;created_at DATETIME&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="280" y="560" width="200" height="230" as="geometry"/>
</mxCell>
<mxCell id="tbl_handover" value="&lt;b&gt;handover (交班记录表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;nurse_id BIGINT FK&lt;br&gt;date DATE&lt;br&gt;content VARCHAR(500)&lt;br&gt;created_at DATETIME&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="30" y="800" width="180" height="140" as="geometry"/>
</mxCell>
<mxCell id="tbl_notice" value="&lt;b&gt;notice (通知表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;title VARCHAR(100)&lt;br&gt;content VARCHAR(1000)&lt;br&gt;target_role VARCHAR(20)&lt;br&gt;target_user_id BIGINT&lt;br&gt;created_by BIGINT FK&lt;br&gt;created_at DATETIME&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="280" y="840" width="200" height="180" as="geometry"/>
</mxCell>
<mxCell id="tbl_feedback" value="&lt;b&gt;feedback (反馈表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;family_id BIGINT FK&lt;br&gt;elder_id BIGINT FK&lt;br&gt;type VARCHAR(20)&lt;br&gt;content VARCHAR(500)&lt;br&gt;rating INT&lt;br&gt;status VARCHAR(20)&lt;br&gt;reply VARCHAR(500)&lt;br&gt;created_at DATETIME&lt;br&gt;updated_at DATETIME&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="630" y="320" width="180" height="240" as="geometry"/>
</mxCell>
<mxCell id="tbl_bill" value="&lt;b&gt;bill (账单表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;elder_id BIGINT FK&lt;br&gt;month VARCHAR(7)&lt;br&gt;bed_fee DECIMAL&lt;br&gt;care_fee DECIMAL&lt;br&gt;meal_fee DECIMAL&lt;br&gt;other_fee DECIMAL&lt;br&gt;total DECIMAL&lt;br&gt;status VARCHAR(20)&lt;br&gt;created_at DATETIME&lt;br&gt;paid_at DATETIME&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="630" y="620" width="180" height="250" as="geometry"/>
</mxCell>
<mxCell id="tbl_payment" value="&lt;b&gt;payment_record (支付记录表)&lt;/b&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin:4px;&quot;&gt;id BIGINT PK&lt;br&gt;bill_id BIGINT FK&lt;br&gt;family_id BIGINT FK&lt;br&gt;amount DECIMAL&lt;br&gt;method VARCHAR(20)&lt;br&gt;paid_at DATETIME&lt;/p&gt;" style="align=left;verticalAlign=top;fillColor=#ffffff;strokeColor=#000000;overflow=hidden;whiteSpace=wrap;html=1;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="870" y="620" width="200" height="160" as="geometry"/>
</mxCell>
<!-- Relationships -->
<mxCell id="r1" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_user" target="tbl_schedule" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r2" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_user" target="tbl_care" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r3" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_user" target="tbl_health" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r4" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_user" target="tbl_handover" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r5" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_user" target="tbl_family_elder" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r6" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_user" target="tbl_feedback" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r7" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_user" target="tbl_payment" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r8" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_user" target="tbl_notice" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r9" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_elder" target="tbl_family_elder" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r10" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_elder" target="tbl_care" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r11" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_elder" target="tbl_health" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r12" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_elder" target="tbl_bill" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r13" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_elder" target="tbl_feedback" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="r14" style="edgeStyle=orthogonalEdgeStyle;endArrow=ERmany;endFill=0;startArrow=ERmandOne;startFill=0;strokeColor=#000000;" edge="1" source="tbl_bill" target="tbl_payment" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>