73 lines
4.9 KiB
XML
73 lines
4.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<mxfile host="app.diagrams.net" modified="2026-06-08T00:00:00.000Z" agent="GitHub Copilot" etag="2">
|
|
<diagram id="erd1" name="ERD">
|
|
<![CDATA[<mxGraphModel dx="800" dy="600" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169">
|
|
<root>
|
|
<mxCell id="0"/>
|
|
<mxCell id="1" parent="0"/>
|
|
|
|
<mxCell id="p1" value="<b>products</b><br/>PK id<br/>name<br/>category<br/>purchase_price<br/>selling_price<br/>image<br/>branch (string)<br/>created_at, updated_at" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFF2CC;strokeColor=#D6B656;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="40" width="220" height="160" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="s1" value="<b>stocks</b><br/>PK id<br/>product_id (FK)<br/>branch (string)<br/>quantity<br/>unit<br/>created_at, updated_at" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E2F0D9;strokeColor=#6AA84F;" vertex="1" parent="1">
|
|
<mxGeometry x="320" y="40" width="220" height="160" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="sa1" value="<b>sales</b><br/>PK id<br/>date<br/>branch (string)<br/>product_id (FK, nullable)<br/>item<br/>quantity<br/>total_price<br/>created_at, updated_at" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#F4CCCC;strokeColor=#B85454;" vertex="1" parent="1">
|
|
<mxGeometry x="600" y="40" width="240" height="180" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="pu1" value="<b>purchases</b><br/>PK id<br/>date<br/>branch (string)<br/>product_id (FK, nullable)<br/>item<br/>quantity<br/>total_price<br/>created_at, updated_at" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#F4CCCC;strokeColor=#B85454;" vertex="1" parent="1">
|
|
<mxGeometry x="600" y="240" width="240" height="180" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="b1" value="<b>branches</b><br/>PK id<br/>name (unique)<br/>created_at, updated_at" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#D9E1FF;strokeColor=#6D9EEB;" vertex="1" parent="1">
|
|
<mxGeometry x="320" y="240" width="220" height="120" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="u1" value="<b>users</b><br/>PK id<br/>name<br/>email<br/>password<br/>role (enum)<br/>branch (string)<br/>created_at, updated_at" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#EAD1DC;strokeColor=#A64D79;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="240" width="220" height="160" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="oc1" value="<b>operational_costs</b><br/>PK id<br/>branch (string)<br/>date<br/>label<br/>amount<br/>created_at, updated_at" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#EFEFEF;strokeColor=#999999;" vertex="1" parent="1">
|
|
<mxGeometry x="600" y="460" width="240" height="140" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#6AA84F;" edge="1" parent="1" source="p1" target="s1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="e2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#B85454;" edge="1" parent="1" source="p1" target="sa1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="e3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#B85454;" edge="1" parent="1" source="p1" target="pu1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="e4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#6D9EEB;" edge="1" parent="1" source="b1" target="s1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="e5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#6D9EEB;" edge="1" parent="1" source="b1" target="sa1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="e6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#6D9EEB;" edge="1" parent="1" source="b1" target="pu1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="e7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#6D9EEB;" edge="1" parent="1" source="b1" target="u1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<mxCell id="e8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeColor=#6D9EEB;" edge="1" parent="1" source="b1" target="oc1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
</root>
|
|
</mxGraphModel>]]>
|
|
</diagram>
|
|
</mxfile>
|