Baseline of the P1 conception work produced over sessions 5-7 (was uncommitted in the working tree). 11-entity model, French naming. Superseded next by the prod-like revision (English, ~16 entities) per the 2026-06-04 decision session - this commit preserves the baseline in history before that rewrite.
56 lines
5.6 KiB
Text
56 lines
5.6 KiB
Text
<mxfile host="app.diagrams.net" agent="claude-code-byan" type="device">
|
|
<diagram name="MLD - RBAC" id="mld-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="t_user" value="<b>user</b><hr><u>PK id : INT UNSIGNED AUTO_INCREMENT</u><br>UK email : VARCHAR(254)<br>password_hash : VARCHAR(255)<br>nom : VARCHAR(60)<br>prenom : VARCHAR(60)<br>FK role_id : INT UNSIGNED<br>est_actif : TINYINT(1) DEFAULT 1<br>last_login_at : DATETIME NULL<br>created_at : DATETIME<br>updated_at : DATETIME" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;fontSize=11;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="60" width="320" height="220" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="t_role" value="<b>role</b><hr><u>PK id : INT UNSIGNED AUTO_INCREMENT</u><br>UK code : VARCHAR(40)<br>libelle : VARCHAR(80)<br>description : TEXT NULL<br>est_actif : TINYINT(1) DEFAULT 1<br>created_at : DATETIME<br>updated_at : DATETIME" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;fontSize=11;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
|
|
<mxGeometry x="440" y="60" width="320" height="160" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="t_permission" value="<b>permission</b><hr><u>PK id : INT UNSIGNED AUTO_INCREMENT</u><br>UK code : VARCHAR(60) format resource.action<br>libelle : VARCHAR(120)<br>description : TEXT NULL<br>created_at : DATETIME" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;fontSize=11;spacingLeft=8;spacingTop=4" vertex="1" parent="1">
|
|
<mxGeometry x="840" y="60" width="320" height="140" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="t_role_permission" value="<b>role_permission</b> (jointure)<hr><u>PK FK role_id : INT UNSIGNED</u><br><u>PK FK permission_id : INT UNSIGNED</u>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;align=left;verticalAlign=top;fontSize=11;spacingLeft=8;spacingTop=4;dashed=1" vertex="1" parent="1">
|
|
<mxGeometry x="600" y="380" width="320" height="100" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="fk_user_role" style="endArrow=open;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t_user" target="t_role">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="fk_user_role_lbl" value="FK ON DELETE RESTRICT" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=10;fillColor=#ffffff;strokeColor=none" vertex="1" connectable="0" parent="fk_user_role">
|
|
<mxGeometry relative="1" as="geometry"><mxPoint as="offset" /></mxGeometry>
|
|
</mxCell>
|
|
|
|
<mxCell id="fk_rp_role" style="endArrow=open;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t_role_permission" target="t_role">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="fk_rp_role_lbl" value="FK ON DELETE CASCADE" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=10;fillColor=#ffffff;strokeColor=none" vertex="1" connectable="0" parent="fk_rp_role">
|
|
<mxGeometry relative="1" as="geometry"><mxPoint as="offset" /></mxGeometry>
|
|
</mxCell>
|
|
|
|
<mxCell id="fk_rp_perm" style="endArrow=open;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle" edge="1" parent="1" source="t_role_permission" target="t_permission">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="fk_rp_perm_lbl" value="FK ON DELETE CASCADE" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=10;fillColor=#ffffff;strokeColor=none" vertex="1" connectable="0" parent="fk_rp_perm">
|
|
<mxGeometry relative="1" as="geometry"><mxPoint as="offset" /></mxGeometry>
|
|
</mxCell>
|
|
|
|
<mxCell id="note_rbac" value="<b>Modele RBAC</b><br>Roles : dynamiques (CRUD admin UI), table principale role.<br>Permissions : statiques (declarees en migration), pas d'updated_at.<br>Mapping role-permission : matrice editable depuis l'UI admin.<br>Voir docs/notes/rbac-roles-permissions.md." style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;align=left;verticalAlign=top;fontSize=10;spacingLeft=8;spacingTop=4;dashed=1" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="380" width="500" height="100" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="legende" value="<b>Legende</b><br><u>PK</u> : cle primaire (composite si plusieurs lignes soulignees)<br>FK : cle etrangere (fleche -> table referencee)<br>UK : contrainte unique<br>Bleu = table principale<br>Jaune pointille = table de jointure" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;align=left;verticalAlign=top;fontSize=10;spacingLeft=8;spacingTop=4;dashed=1" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="540" width="500" height="120" as="geometry" />
|
|
</mxCell>
|
|
|
|
</root>
|
|
</mxGraphModel>
|
|
</diagram>
|
|
</mxfile>
|