Browse Source

完成了数据库表结构的设计

NandHyf 1 year ago
parent
commit
92b3ca88ca
3 changed files with 137 additions and 4 deletions
  1. 136 0
      KBC-chart.drawio
  2. 1 4
      Stateful.py
  3. BIN
      数据库表结构设计.png

+ 136 - 0
KBC-chart.drawio

@@ -0,0 +1,136 @@
+<mxfile host="app.diagrams.net" modified="2023-10-19T07:05:37.475Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 Edg/118.0.2088.46" etag="CYWbZvkdm9E_PX37ZPY1" version="22.0.5" type="device">
+  <diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
+    <mxGraphModel dx="1192" dy="536" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+      <root>
+        <mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
+        <mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
+        <mxCell id="nhFDIQsgN1y8CI52urcy-187" value="Class" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
+          <mxGeometry x="244" y="110" width="140" height="180" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-188" value="class_uid" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-187" vertex="1">
+          <mxGeometry y="30" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-189" value="class_name" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-187" vertex="1">
+          <mxGeometry y="60" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-193" value="used_board" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-187" vertex="1">
+          <mxGeometry y="90" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-192" value="status" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-187" vertex="1">
+          <mxGeometry y="120" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-191" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-187" vertex="1">
+          <mxGeometry y="150" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-194" value="Board" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
+          <mxGeometry x="44" y="110" width="140" height="150" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-195" value="board_uid" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-194" vertex="1">
+          <mxGeometry y="30" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-196" value="board_name" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-194" vertex="1">
+          <mxGeometry y="60" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-198" value="status" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-194" vertex="1">
+          <mxGeometry y="90" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-199" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-194" vertex="1">
+          <mxGeometry y="120" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-201" value="Event" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
+          <mxGeometry x="444" y="110" width="140" height="330" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-202" value="event_uid" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-201" vertex="1">
+          <mxGeometry y="30" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-203" value="event_name" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-201" vertex="1">
+          <mxGeometry y="60" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-204" value="event_dscrp" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-201" vertex="1">
+          <mxGeometry y="90" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-205" value="event_creator" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-201" vertex="1">
+          <mxGeometry y="120" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-206" value="createdTime:datetime" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-201" vertex="1">
+          <mxGeometry y="150" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-207" value="class_created" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-201" vertex="1">
+          <mxGeometry y="180" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-212" value="ddlTime:datetime" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-201" vertex="1">
+          <mxGeometry y="210" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-211" value="alertTime:alertFunc" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-201" vertex="1">
+          <mxGeometry y="240" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-210" value="current_class" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-201" vertex="1">
+          <mxGeometry y="270" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-213" value="status" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-201" vertex="1">
+          <mxGeometry y="300" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-214" value="Stucked" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
+          <mxGeometry x="644" y="110" width="140" height="150" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-215" value="board_uid" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-214" vertex="1">
+          <mxGeometry y="30" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-216" value="event_uid" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-214" vertex="1">
+          <mxGeometry y="60" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-218" value="stucked_time:datetime" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-214" vertex="1">
+          <mxGeometry y="90" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-219" value="solved_time:datetime" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="nhFDIQsgN1y8CI52urcy-214" vertex="1">
+          <mxGeometry y="120" width="140" height="30" as="geometry" />
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-230" value="" style="endArrow=oval;html=1;rounded=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;dashed=1;entryX=1.001;entryY=0.591;entryDx=0;entryDy=0;edgeStyle=orthogonalEdgeStyle;startArrow=oval;startFill=1;endFill=1;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nhFDIQsgN1y8CI52urcy-193" target="nhFDIQsgN1y8CI52urcy-195" edge="1">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="200.35999999999999" y="218.04999999999998" as="sourcePoint" />
+            <mxPoint x="184" y="152" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-231" value="" style="endArrow=oval;html=1;rounded=0;entryX=0.999;entryY=0.617;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;dashed=1;edgeStyle=orthogonalEdgeStyle;startArrow=oval;startFill=1;endFill=1;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nhFDIQsgN1y8CI52urcy-210" target="nhFDIQsgN1y8CI52urcy-188" edge="1">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="354" y="300" as="sourcePoint" />
+            <mxPoint x="404" y="250" as="targetPoint" />
+            <Array as="points">
+              <mxPoint x="400" y="395" />
+              <mxPoint x="400" y="159" />
+              <mxPoint x="384" y="159" />
+            </Array>
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-232" value="" style="endArrow=oval;html=1;rounded=0;dashed=1;endFill=1;startArrow=oval;startFill=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;edgeStyle=orthogonalEdgeStyle;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nhFDIQsgN1y8CI52urcy-216" target="nhFDIQsgN1y8CI52urcy-202" edge="1">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="544" y="210" as="sourcePoint" />
+            <mxPoint x="594" y="160" as="targetPoint" />
+            <Array as="points">
+              <mxPoint x="614" y="185" />
+              <mxPoint x="614" y="155" />
+            </Array>
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="nhFDIQsgN1y8CI52urcy-233" value="" style="endArrow=oval;startArrow=oval;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;edgeStyle=orthogonalEdgeStyle;startFill=1;endFill=1;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nhFDIQsgN1y8CI52urcy-195" target="nhFDIQsgN1y8CI52urcy-215" edge="1">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="594" y="210" as="sourcePoint" />
+            <mxPoint x="644" y="160" as="targetPoint" />
+            <Array as="points">
+              <mxPoint x="214" y="150" />
+              <mxPoint x="214" y="80" />
+              <mxPoint x="624" y="80" />
+              <mxPoint x="624" y="155" />
+            </Array>
+          </mxGeometry>
+        </mxCell>
+        <mxCell id="Gs5nCNOHAZd9Ihr5n0aR-0" value="" style="endArrow=oval;html=1;rounded=0;entryX=0.999;entryY=0.302;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;dashed=1;edgeStyle=orthogonalEdgeStyle;endFill=1;entryPerimeter=0;startArrow=oval;startFill=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="nhFDIQsgN1y8CI52urcy-207" target="nhFDIQsgN1y8CI52urcy-188">
+          <mxGeometry width="50" height="50" relative="1" as="geometry">
+            <mxPoint x="300" y="410" as="sourcePoint" />
+            <mxPoint x="350" y="360" as="targetPoint" />
+          </mxGeometry>
+        </mxCell>
+      </root>
+    </mxGraphModel>
+  </diagram>
+</mxfile>

+ 1 - 4
Stateful.py

@@ -89,10 +89,7 @@ def add_INSERT_INTO():
 def edit_UPDATE():
     pass
 
-def delete_DELELTE():
-    pass
-
-def delete_DROP():
+def delete_status2del():
     pass
 
 # Markdown

BIN
数据库表结构设计.png