diff --git a/Documentation/Documentation.md b/Documentation/Documentation.md index d283df9dc6aedf321d2d1efb4260efd587b4bb5a..36ccc4e455e19499e405f4df5e7dac30ba5dca8f 100644 --- a/Documentation/Documentation.md +++ b/Documentation/Documentation.md @@ -34,4 +34,11 @@ Voici le schéma des données : Dans le backend, on a décidé d'utiliser le wrapper `promised-sqlite3`. Il fonctionne autour du module `sqlite3` et permet l'usage des promesses pour sqlite3. Cela nous permet de gérer facilement les retours de la base de données, sans avoir à se soucier de la synchrone. -Pour gérer \ No newline at end of file +Pour gérer les appels à la base de donnée, nous avons créer une API + +- User + - f +- Question +- Answers +- Category +- Login \ No newline at end of file diff --git a/Documentation/db_diagram.drawio b/Documentation/db_diagram.drawio index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..229de2d54ecfe64dabd6210d4907814280c87bf2 100644 --- a/Documentation/db_diagram.drawio +++ b/Documentation/db_diagram.drawio @@ -0,0 +1,76 @@ +<mxfile host="65bd71144e"> + <diagram id="YQ82JMaFKs9fSYfRQdZt" name="Page-1"> + <mxGraphModel dx="656" dy="450" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> + <root> + <mxCell id="0"/> + <mxCell id="1" parent="0"/> + <mxCell id="6" value="Users" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;html=1;" vertex="1" parent="1"> + <mxGeometry x="80" y="40" width="180" height="130" as="geometry"/> + </mxCell> + <mxCell id="7" value="<b><u>id</u>&nbsp; <u>integer</u> <u>autoincrement</u></b>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="6"> + <mxGeometry y="26" width="180" height="26" as="geometry"/> + </mxCell> + <mxCell id="8" value="username text unique" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="6"> + <mxGeometry y="52" width="180" height="26" as="geometry"/> + </mxCell> + <mxCell id="9" value="password text" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="6"> + <mxGeometry y="78" width="180" height="26" as="geometry"/> + </mxCell> + <mxCell id="12" value="admin boolean" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="6"> + <mxGeometry y="104" width="180" height="26" as="geometry"/> + </mxCell> + <mxCell id="38" style="edgeStyle=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=0.998;entryDx=0;entryDy=0;entryPerimeter=0;fontColor=#FFFFFF;startArrow=none;startFill=0;endArrow=none;endFill=0;" edge="1" parent="1" source="13" target="30"> + <mxGeometry relative="1" as="geometry"/> + </mxCell> + <mxCell id="13" value="Questions" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;html=1;" vertex="1" parent="1"> + <mxGeometry x="330" y="226" width="200" height="140" as="geometry"/> + </mxCell> + <mxCell id="14" value="<b><u>id</u>&nbsp; <u>integer</u> <u>autoincrement</u></b>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="13"> + <mxGeometry y="26" width="200" height="26" as="geometry"/> + </mxCell> + <mxCell id="15" value="question text unique" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="13"> + <mxGeometry y="52" width="200" height="26" as="geometry"/> + </mxCell> + <mxCell id="16" value="category text" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="13"> + <mxGeometry y="78" width="200" height="26" as="geometry"/> + </mxCell> + <mxCell id="19" value="" style="line;strokeWidth=2;html=1;" vertex="1" parent="13"> + <mxGeometry y="104" width="200" height="10" as="geometry"/> + </mxCell> + <mxCell id="18" value="Ref: category&nbsp;<span style="font-family: sans-serif; font-size: 14px;">⊆ Categories.title</span>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="13"> + <mxGeometry y="114" width="200" height="26" as="geometry"/> + </mxCell> + <mxCell id="20" value="Answers" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;html=1;" vertex="1" parent="1"> + <mxGeometry x="80" y="200" width="200" height="166" as="geometry"/> + </mxCell> + <mxCell id="21" value="<b><u>id</u>&nbsp; <u>integer</u> <u>autoincrement</u></b>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="20"> + <mxGeometry y="26" width="200" height="26" as="geometry"/> + </mxCell> + <mxCell id="22" value="text_answer text" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="20"> + <mxGeometry y="52" width="200" height="26" as="geometry"/> + </mxCell> + <mxCell id="23" value="id_question integer" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="20"> + <mxGeometry y="78" width="200" height="26" as="geometry"/> + </mxCell> + <mxCell id="26" value="correct boolean" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="20"> + <mxGeometry y="104" width="200" height="26" as="geometry"/> + </mxCell> + <mxCell id="24" value="" style="line;strokeWidth=2;html=1;" vertex="1" parent="20"> + <mxGeometry y="130" width="200" height="10" as="geometry"/> + </mxCell> + <mxCell id="25" value="Ref: id_question&nbsp;<span style="font-family: sans-serif; font-size: 14px;">⊆ Questions.id</span>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="20"> + <mxGeometry y="140" width="200" height="26" as="geometry"/> + </mxCell> + <mxCell id="28" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontColor=#FFFFFF;endArrow=none;endFill=0;startArrow=none;startFill=0;" edge="1" parent="1" source="23" target="15"> + <mxGeometry relative="1" as="geometry"/> + </mxCell> + <mxCell id="29" value="Categories" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;html=1;" vertex="1" parent="1"> + <mxGeometry x="340" y="100" width="180" height="52" as="geometry"/> + </mxCell> + <mxCell id="30" value="<b><u>title</u>&nbsp;&nbsp;<u>text</u> <u>unique</u></b>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="29"> + <mxGeometry y="26" width="180" height="26" as="geometry"/> + </mxCell> + </root> + </mxGraphModel> + </diagram> +</mxfile> \ No newline at end of file