84 lines
5.2 KiB
XML
84 lines
5.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<mxfile host="app.diagrams.net" modified="2026-06-09T00:00:00.000Z" agent="GitHub Copilot" etag="" version="20.2.3" type="device">
|
|
<diagram id="class-diagram" name="Class Diagram">
|
|
<![CDATA[
|
|
<mxGraphModel dx="1187" dy="700" 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="0"/>
|
|
<mxCell id="1" parent="0"/>
|
|
|
|
<!-- User -->
|
|
<mxCell id="u" value="User\n+ id : int\n+ name : string\n+ email : string\n+ password : string\n+ role : enum(admin, employee)\n+ branch : string" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="40" width="220" height="140" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- Branch -->
|
|
<mxCell id="b" value="Branch\n+ id : int\n+ name : string" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e2f0d9;strokeColor=#7aa874;fontSize=12;" vertex="1" parent="1">
|
|
<mxGeometry x="320" y="40" width="160" height="80" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- Product -->
|
|
<mxCell id="p" value="Product\n+ id : int\n+ name : string\n+ category : enum\n+ purchase_price : int\n+ selling_price : int\n+ image : string" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d9eaf7;strokeColor=#6b9bd1;fontSize=12;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="220" width="240" height="140" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- Stock -->
|
|
<mxCell id="s" value="Stock\n+ id : int\n+ product_id : int\n+ branch : string\n+ quantity : int\n+ unit : string" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f3e5f5;strokeColor=#b08cc6;fontSize=12;" vertex="1" parent="1">
|
|
<mxGeometry x="320" y="220" width="220" height="110" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- Purchase -->
|
|
<mxCell id="pur" value="Purchase\n+ id : int\n+ date : date\n+ branch : string\n+ product_id : int\n+ item : string\n+ quantity : int\n+ total_price : int" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fbe6e6;strokeColor=#e08b8b;fontSize=12;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="400" width="300" height="140" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- Sale -->
|
|
<mxCell id="sale" value="Sale\n+ id : int\n+ date : date\n+ branch : string\n+ product_id : int\n+ item : string\n+ quantity : int\n+ total_price : int" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#eef7f1;strokeColor=#7bb48a;fontSize=12;" vertex="1" parent="1">
|
|
<mxGeometry x="380" y="400" width="300" height="140" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- OperationalCost -->
|
|
<mxCell id="op" value="OperationalCost\n+ id : int\n+ branch : string\n+ date : date\n+ label : string\n+ amount : int" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff0f6;strokeColor=#d48ea8;fontSize=12;" vertex="1" parent="1">
|
|
<mxGeometry x="640" y="220" width="240" height="110" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- Relations: Product 1..* Stock -->
|
|
<mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;" edge="1" source="p" target="s" parent="1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- Product -> Purchase -->
|
|
<mxCell id="e2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;" edge="1" source="p" target="pur" parent="1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- Product -> Sale -->
|
|
<mxCell id="e3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;" edge="1" source="p" target="sale" parent="1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- User -> Branch (association by branch name) -->
|
|
<mxCell id="e4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;endArrow=none;" edge="1" source="u" target="b" parent="1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
<!-- Other associations to Branch -->
|
|
<mxCell id="e5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;endArrow=none;" edge="1" source="pur" target="b" parent="1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="e6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;endArrow=none;" edge="1" source="sale" target="b" parent="1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="e7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;endArrow=none;" edge="1" source="s" target="b" parent="1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="e8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;endArrow=none;" edge="1" source="op" target="b" parent="1">
|
|
<mxGeometry relative="1" as="geometry"/>
|
|
</mxCell>
|
|
|
|
</root>
|
|
</mxGraphModel>
|
|
]]>
|
|
</diagram>
|
|
</mxfile>
|