From 4f1a44549b743631da89abfb42f01697a17a6dbb Mon Sep 17 00:00:00 2001 From: Debucquoy Anthony Date: Fri, 15 Dec 2023 14:36:10 +0100 Subject: [PATCH 1/4] ERB msg done (#14) # Entity relational diagram ## Messaging extension ```mermaid %%{init: { "er": {"fontSize": 25}}}%% 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 } 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 Co-authored-by: Debucquoy Reviewed-on: https://git.herisson.ovh/PGL/Clyde/pulls/14 Reviewed-by: Maxime <231026@umons.ac.be> --- Documents/proto/messaging_extension/ERD.md | 87 ++++++++++++++++++++ Documents/proto/messaging_extension/Makefile | 1 + 2 files changed, 88 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..0a4108c --- /dev/null +++ b/Documents/proto/messaging_extension/ERD.md @@ -0,0 +1,87 @@ +# Entity relational diagram + +## Messaging extension + +```mermaid +%%{init: { "er": {"fontSize": 25, "stroke": "black" }}}%% +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 + Integer course FK "Course" +} + +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 +} +Options{ + Integer id PK + String name +} + +Forums ||--o{ Users: "Registered" +Forums ||--|| Teacher: "Owner" +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 +Teacher +Appointments{ + Integer id PK + Integer teacher FK "Teacher" + TIME sent_time + enum Status +} + +Appointments ||--|| Users: "" + +``` + +Debucquoy Anthony 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 From abef330bd72a8614f64bddfce51fb63b4fdd9f8c Mon Sep 17 00:00:00 2001 From: Debucquoy Anthony Date: Fri, 15 Dec 2023 14:36:44 +0100 Subject: [PATCH 2/4] class diagram messaging extension (#13) Co-authored-by: Anthony Debucquoy Reviewed-on: https://git.herisson.ovh/PGL/Clyde/pulls/13 Reviewed-by: Maxime <231026@umons.ac.be> --- Documents/proto/messaging_extension/Makefile | 3 +- Documents/proto/messaging_extension/class.uml | 86 +++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 Documents/proto/messaging_extension/class.uml diff --git a/Documents/proto/messaging_extension/Makefile b/Documents/proto/messaging_extension/Makefile index 8bd79dc..7ba3e31 100644 --- a/Documents/proto/messaging_extension/Makefile +++ b/Documents/proto/messaging_extension/Makefile @@ -11,7 +11,7 @@ extension_messagerie.pdf:use_case_messagerie.tex extension_messagerie.bbl extens use_case_messagerie.tex: use_case_messagerie.uml plantuml -tlatex:nopreamble use_case_messagerie.uml -image: use_case_messagerie.uml interaction_diagram.uml +image: use_case_messagerie.uml interaction_diagram.uml class.uml plantuml $^ mmdc -i ERD.md -o ERD.png @@ -25,6 +25,7 @@ clean: latexmk -C rm -f use_case_messagerie.tex rm -f extension_messagerie.{bbl,run.xml} + rm -f class.tex run: extension_messagerie.pdf xdg-open $< diff --git a/Documents/proto/messaging_extension/class.uml b/Documents/proto/messaging_extension/class.uml new file mode 100644 index 0000000..48ef5b9 --- /dev/null +++ b/Documents/proto/messaging_extension/class.uml @@ -0,0 +1,86 @@ +@startuml +title Class diagram for Messaging extension + +package Messages { + class Message{ + content: String + response: Message + respond(User, String) + } + class Discussion{ + name: String + users: ArrayList + invite(User) + sendMessage(User, String) + } + Discussion *-- Message +} + +package Forums { + class Forum{ + name: String + Owner: Teacher + Registered: ArrayList + {static} createForum(Course): Forum + createTopic(String): Topic + createPoll(String, PollType, ArrayList