2023-12-13 16:15:21 +01:00
|
|
|
# Entity relational diagram
|
|
|
|
|
|
|
|
## Messaging extension
|
|
|
|
|
|
|
|
```mermaid
|
2023-12-13 22:31:50 +01:00
|
|
|
%%{init: { "er": {"fontSize": 25, "stroke": "black" }}}%%
|
2023-12-13 16:15:21 +01:00
|
|
|
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
|
2023-12-13 22:31:50 +01:00
|
|
|
Integer course FK "Course"
|
2023-12-13 16:15:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2023-12-13 22:31:50 +01:00
|
|
|
enum PollType
|
2023-12-13 16:15:21 +01:00
|
|
|
}
|
|
|
|
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
|
2023-12-13 22:31:50 +01:00
|
|
|
Teacher
|
2023-12-13 16:15:21 +01:00
|
|
|
Appointments{
|
|
|
|
Integer id PK
|
2023-12-13 22:31:50 +01:00
|
|
|
Integer teacher FK "Teacher"
|
2023-12-13 16:15:21 +01:00
|
|
|
TIME sent_time
|
|
|
|
enum Status
|
|
|
|
}
|
|
|
|
|
|
|
|
Appointments ||--|| Users: ""
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
Debucquoy Anthony
|