From 9c1103ab5937a1e80e416096117a680764343b58 Mon Sep 17 00:00:00 2001 From: Debucquoy Date: Wed, 13 Dec 2023 16:15:21 +0100 Subject: [PATCH 1/2] First ERB messaging --- Documents/proto/messaging_extension/ERD.md | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Documents/proto/messaging_extension/ERD.md diff --git a/Documents/proto/messaging_extension/ERD.md b/Documents/proto/messaging_extension/ERD.md new file mode 100644 index 0000000..014f964 --- /dev/null +++ b/Documents/proto/messaging_extension/ERD.md @@ -0,0 +1,86 @@ +# Entity relational diagram + +## Messaging extension + +```mermaid +erDiagram + +%% General +Users + +%% Messages +Discussions{ + Integer id PK + String name +} + +Messages{ + Integer id PK + Integer response FK "Messages" + String content +} + +Discussions ||--o{ Messages: "" +Discussions ||--o{ Users: "" + +Messages o|--o{ Messages: "answers" + +%% Forums +Forums{ + Integer id PK + String name +} + +Topics{ + Integer id PK + String subject + String content + Boolean locked +} +Answers{ + Integer id PK + String content + Boolean anonymous + TimeStamp creation_time +} + +Polls{ + Integer id PK + enum PollType "ALLOW_NEW_OPTIONS ALLOW_MULTIPLE CHOICE" +} +Options{ + Integer id PK + String name +} + +Forums ||--o{ Users: "Registered" +Forums ||--|| Teacher: "Owner" +Forums ||--|| Course: "" +Forums ||--o{ Topics: "" +Forums ||--o{ Polls: "" + +Topics ||--|| Teacher: "Author" +Topics ||--|| Users: "Author" +Topics ||--o{ Answers: "" + +Polls ||--o{ Options: "" + +Options ||--o{ Votes : "" + +Votes }o--|| Users: "Voter" + + +%% Appointments +Teachers +Appointments{ + Integer id PK + TIME sent_time + enum Status +} + +Appointments ||--|| Teachers: "" +Appointments ||--|| Users: "" + +``` + +Debucquoy Anthony -- 2.46.0 From d4e3ded3da17edd79fbaef7c26059d2ef54b7928 Mon Sep 17 00:00:00 2001 From: Debucquoy Anthony Date: Wed, 13 Dec 2023 22:31:50 +0100 Subject: [PATCH 2/2] Rework Update 'Documents/proto/messaging_extension/ERD.md' Makefile for image --- Documents/proto/messaging_extension/ERD.md | 9 +++++---- Documents/proto/messaging_extension/Makefile | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Documents/proto/messaging_extension/ERD.md b/Documents/proto/messaging_extension/ERD.md index 014f964..0a4108c 100644 --- a/Documents/proto/messaging_extension/ERD.md +++ b/Documents/proto/messaging_extension/ERD.md @@ -3,6 +3,7 @@ ## Messaging extension ```mermaid +%%{init: { "er": {"fontSize": 25, "stroke": "black" }}}%% erDiagram %% General @@ -29,6 +30,7 @@ Messages o|--o{ Messages: "answers" Forums{ Integer id PK String name + Integer course FK "Course" } Topics{ @@ -46,7 +48,7 @@ Answers{ Polls{ Integer id PK - enum PollType "ALLOW_NEW_OPTIONS ALLOW_MULTIPLE CHOICE" + enum PollType } Options{ Integer id PK @@ -55,7 +57,6 @@ Options{ Forums ||--o{ Users: "Registered" Forums ||--|| Teacher: "Owner" -Forums ||--|| Course: "" Forums ||--o{ Topics: "" Forums ||--o{ Polls: "" @@ -71,14 +72,14 @@ Votes }o--|| Users: "Voter" %% Appointments -Teachers +Teacher Appointments{ Integer id PK + Integer teacher FK "Teacher" TIME sent_time enum Status } -Appointments ||--|| Teachers: "" Appointments ||--|| Users: "" ``` diff --git a/Documents/proto/messaging_extension/Makefile b/Documents/proto/messaging_extension/Makefile index cf0e6b4..8bd79dc 100644 --- a/Documents/proto/messaging_extension/Makefile +++ b/Documents/proto/messaging_extension/Makefile @@ -13,6 +13,7 @@ use_case_messagerie.tex: use_case_messagerie.uml image: use_case_messagerie.uml interaction_diagram.uml plantuml $^ + mmdc -i ERD.md -o ERD.png extension_messagerie.bbl: extension_messagerie.bcf biber extension_messagerie -- 2.46.0