Switch from Mermaid to drawio for MCD diagrams to gain manual layout control on the global view (10 entites + 10 associations, planarite intrinseque non resolue par Mermaid auto-layout). - mcd-global.drawio : 10 entites + 8 associations (vue compacte sans attributs) - mcd-catalogue.drawio : Categorie / Produit / Menu / MenuProduit avec attributs - mcd-commande.drawio : Commande / LigneCommande + polymorphisme vers Produit/Menu - mcd-rbac.drawio : User / Role / Permission / RolePermission Notation Merise (min,max) sur chaque cote d'association. Layout de depart a affiner manuellement dans drawio web (Edit Diagram -> XML). SVG a regenerer en exportant depuis drawio web.
57 lines
5.2 KiB
Text
57 lines
5.2 KiB
Text
<mxfile host="app.diagrams.net" agent="claude-code-byan" type="device">
|
|
<diagram name="MCD - RBAC" id="mcd-rbac">
|
|
<mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="826" math="0" shadow="0">
|
|
<root>
|
|
<mxCell id="0" />
|
|
<mxCell id="1" parent="0" />
|
|
|
|
<mxCell id="user" value="<b>USER</b><hr>id : INT (PK)<br>email : VARCHAR (UNIQUE, RFC 5321)<br>password_hash : VARCHAR (argon2id)<br>nom : VARCHAR<br>prenom : VARCHAR<br>role_id : INT (FK)<br>est_actif : BOOLEAN<br>last_login_at : DATETIME" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;fontSize=12;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
|
|
<mxGeometry x="60" y="80" width="280" height="200" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="role" value="<b>ROLE</b><hr>id : INT (PK)<br>code : VARCHAR (UNIQUE)<br>libelle : VARCHAR<br>description : TEXT<br>est_actif : BOOLEAN" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;fontSize=12;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
|
|
<mxGeometry x="440" y="80" width="280" height="160" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="permission" value="<b>PERMISSION</b><hr>id : INT (PK)<br>code : VARCHAR (UNIQUE, resource.action)<br>libelle : VARCHAR<br>description : TEXT" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;fontSize=12;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
|
|
<mxGeometry x="820" y="80" width="280" height="160" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="role_permission" value="<b>ROLE_PERMISSION</b> <i>(associative)</i><hr>role_id : INT (PK, FK)<br>permission_id : INT (PK, FK)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;align=left;verticalAlign=top;fontSize=12;spacingLeft=8;spacingTop=4;dashed=1" vertex="1" parent="1">
|
|
<mxGeometry x="630" y="440" width="300" height="120" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="e_user_role" value="a_pour_role" style="endArrow=none;html=1;fontSize=12;fontStyle=2;edgeStyle=orthogonalEdgeStyle;rounded=0" edge="1" parent="1" source="user" target="role">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e_user_role_a" value="(1,1)" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=11;fontStyle=1;fillColor=#ffffff;strokeColor=none" vertex="1" connectable="0" parent="e_user_role">
|
|
<mxGeometry x="-0.85" relative="1" as="geometry"><mxPoint as="offset" /></mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="e_user_role_b" value="(0,N)" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=11;fontStyle=1;fillColor=#ffffff;strokeColor=none" vertex="1" connectable="0" parent="e_user_role">
|
|
<mxGeometry x="0.85" relative="1" as="geometry"><mxPoint as="offset" /></mxGeometry>
|
|
</mxCell>
|
|
|
|
<mxCell id="e_role_rp" value="possede" style="endArrow=none;html=1;fontSize=12;fontStyle=2;edgeStyle=orthogonalEdgeStyle;rounded=0" edge="1" parent="1" source="role" target="role_permission">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e_role_rp_a" value="(0,N)" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=11;fontStyle=1;fillColor=#ffffff;strokeColor=none" vertex="1" connectable="0" parent="e_role_rp">
|
|
<mxGeometry x="-0.85" relative="1" as="geometry"><mxPoint as="offset" /></mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="e_role_rp_b" value="(1,1)" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=11;fontStyle=1;fillColor=#ffffff;strokeColor=none" vertex="1" connectable="0" parent="e_role_rp">
|
|
<mxGeometry x="0.85" relative="1" as="geometry"><mxPoint as="offset" /></mxGeometry>
|
|
</mxCell>
|
|
|
|
<mxCell id="e_perm_rp" value="assignee_a" style="endArrow=none;html=1;fontSize=12;fontStyle=2;edgeStyle=orthogonalEdgeStyle;rounded=0" edge="1" parent="1" source="permission" target="role_permission">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e_perm_rp_a" value="(0,N)" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=11;fontStyle=1;fillColor=#ffffff;strokeColor=none" vertex="1" connectable="0" parent="e_perm_rp">
|
|
<mxGeometry x="-0.85" relative="1" as="geometry"><mxPoint as="offset" /></mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="e_perm_rp_b" value="(1,1)" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=11;fontStyle=1;fillColor=#ffffff;strokeColor=none" vertex="1" connectable="0" parent="e_perm_rp">
|
|
<mxGeometry x="0.85" relative="1" as="geometry"><mxPoint as="offset" /></mxGeometry>
|
|
</mxCell>
|
|
|
|
</root>
|
|
</mxGraphModel>
|
|
</diagram>
|
|
</mxfile>
|