2024-09-05 22:35:59 +02:00
|
|
|
---
|
|
|
|
title: Classroom
|
|
|
|
---
|
|
|
|
|
|
|
|
erDiagram
|
2024-09-06 20:07:32 +02:00
|
|
|
USER ||--o{ USER_CLASSROOM : "part of"
|
|
|
|
USER_CLASSROOM }o--|| CLASSROOM : allows
|
|
|
|
USER ||--|| STUDENT : is
|
|
|
|
USER ||--|| ADMIN : is
|
|
|
|
USER ||--|| TEACHER : is
|
2024-09-05 22:35:59 +02:00
|
|
|
|
2024-09-07 12:29:39 +02:00
|
|
|
TEACHER }o--o{ CLASSROOM : creates
|
2024-09-06 20:07:32 +02:00
|
|
|
TEACHER ||--o{ QUIZ : creates
|
|
|
|
%% TEACHER }o--o{ ASSIGMENT : makes
|
|
|
|
ROLES }|--|| TEACHER : has
|
2024-09-06 18:44:59 +02:00
|
|
|
|
|
|
|
QUIZ ||--|{ QUESTION : contains
|
2024-09-07 12:29:39 +02:00
|
|
|
QUESTION ||--|| "QUESTION-ANSWER": "gets chosen"
|
2024-09-05 22:35:59 +02:00
|
|
|
|
2024-09-06 20:07:32 +02:00
|
|
|
%% STUDENT }o--o{ ASSIGMENT : gets
|
2024-09-05 22:35:59 +02:00
|
|
|
|
2024-09-07 12:29:39 +02:00
|
|
|
"TEACHER-STUDENT MESSAGES" ||--|| CLASSROOM : contains
|
2024-09-06 12:30:20 +02:00
|
|
|
|
2024-09-06 20:07:32 +02:00
|
|
|
MATERIAL }o--|| ASSIGMENT : contains
|
|
|
|
DRIVE ||--|{ MATERIAL : accesses
|
|
|
|
|
|
|
|
%% STUDENT }o--o{ CLASSROOM : "part of"
|
2024-09-07 12:29:39 +02:00
|
|
|
"TEACHER-STUDENT MESSAGES" }o--|| TEACHER : "part of"
|
2024-09-06 12:30:20 +02:00
|
|
|
CLASSROOM ||--o{ ASSIGMENT : contains
|
2024-09-05 22:35:59 +02:00
|
|
|
|
|
|
|
ASSIGMENT ||--o| CHAT : has
|
2024-09-06 20:07:32 +02:00
|
|
|
STUDENT ||--|{ CHAT : "part of"
|
2024-09-05 22:35:59 +02:00
|
|
|
|
2024-09-07 12:29:39 +02:00
|
|
|
STUDENT ||--o{ "TEACHER-STUDENT MESSAGES" : "part of"
|
2024-09-06 12:30:20 +02:00
|
|
|
|
2024-09-07 12:29:39 +02:00
|
|
|
STUDENT ||--o{ "PRIVATE-MESSAGE": "part of"
|
2024-09-09 08:22:17 +02:00
|
|
|
STUDENT ||--o{ ROLES : has
|
2024-09-07 12:29:39 +02:00
|
|
|
|
2024-09-06 12:30:20 +02:00
|
|
|
STUDENT ||--|| DRIVE : "uploads to"
|
2024-09-09 08:22:17 +02:00
|
|
|
TEACHER ||--o{ "PRIVATE-MESSAGE": "part of"
|
2024-09-06 12:30:20 +02:00
|
|
|
TEACHER ||--|| DRIVE : "uploads to"
|
2024-09-06 20:07:32 +02:00
|
|
|
%% TEACHER }o--o{ MATERIAL : makes
|
|
|
|
ADMIN ||--o{ ROLES : creates
|
|
|
|
ADMIN ||--|| DRIVE : "uploads to"
|
|
|
|
|
|
|
|
USER ||--o{ TEACHER_MATERIAL : "part of"
|
|
|
|
TEACHER_MATERIAL }o--|| MATERIAL : allows
|
|
|
|
|
|
|
|
USER ||--o{ USER_ASSIGNMENT : "part of"
|
|
|
|
USER_ASSIGNMENT }o--|| ASSIGMENT : allows
|
|
|
|
|
|
|
|
|
|
|
|
%% Connection tables
|
|
|
|
USER_CLASSROOM {
|
|
|
|
uuid userId PK, FK
|
|
|
|
uuid classroomId PK, FK
|
|
|
|
}
|
|
|
|
|
|
|
|
USER_ASSIGNMENT {
|
|
|
|
uuid userId PK, FK
|
|
|
|
uuid assigmentId PK, FK
|
|
|
|
}
|
|
|
|
|
|
|
|
TEACHER_MATERIAL {
|
|
|
|
uuid userId PK, FK
|
|
|
|
uuid materialId PK, FK
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
%% Definitions of attributes
|
|
|
|
USER {
|
|
|
|
uuid userId PK
|
|
|
|
%% TODO figure out what keycloak gives as an identifier
|
|
|
|
uuid keyCloakId FK
|
|
|
|
enum userType
|
|
|
|
string name
|
|
|
|
string nickname
|
|
|
|
string email
|
2024-09-07 12:29:39 +02:00
|
|
|
date dateOfBirth
|
|
|
|
datetime dateTimeOfJoin
|
|
|
|
enum active
|
|
|
|
%% active = just like on discord, so the teachers can spy on the students if they're doing their work in class or just scrolling through TikTok
|
2024-09-06 20:07:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
CLASSROOM {
|
|
|
|
uuid classroomId PK
|
|
|
|
uuid creatorId FK
|
2024-09-09 08:22:17 +02:00
|
|
|
uuid createdByUsedId
|
2024-09-07 12:29:39 +02:00
|
|
|
datetime creationDateTime
|
2024-09-06 20:07:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ASSIGMENT {
|
|
|
|
uuid assigmentId PK, FK
|
2024-09-07 12:29:39 +02:00
|
|
|
uuid containingChatId
|
|
|
|
datetime creationDateTime
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
%% basic chatting attributes, can add more in the future
|
|
|
|
CHAT {
|
|
|
|
uuid chatId PK
|
|
|
|
uuid senderId
|
|
|
|
date sentDate
|
|
|
|
text messageText
|
|
|
|
}
|
|
|
|
|
|
|
|
"TEACHER-STUDENT MESSAGES" {
|
|
|
|
uuid teacherStudentMessageId PK
|
|
|
|
uuid senderId
|
|
|
|
datetime sentDateTime
|
|
|
|
text messageText
|
|
|
|
}
|
|
|
|
|
|
|
|
ROLES {
|
|
|
|
uuid roleId PK
|
2024-09-09 08:22:17 +02:00
|
|
|
uuid createdByUsedId
|
2024-09-07 12:29:39 +02:00
|
|
|
datetime creationDateTime
|
|
|
|
string roleName
|
|
|
|
%% idk about these
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DRIVE {
|
|
|
|
uuid materialId FK
|
|
|
|
uuid uploaderId
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
%% idk how file upload works, so I'll just give it a text attribute. needs changing
|
|
|
|
MATERIAL {
|
|
|
|
uuid materialId PK, FK
|
|
|
|
uuid creatorId
|
|
|
|
datetime creationDateTime
|
|
|
|
text materialContent
|
|
|
|
}
|
|
|
|
|
|
|
|
%% added this table because you wanna dm the teacher
|
|
|
|
"PRIVATE-MESSAGE" {
|
|
|
|
uuid privateMessageId PK
|
|
|
|
uuid senderId
|
|
|
|
datetime sentDateTime
|
|
|
|
text messageText
|
|
|
|
}
|
|
|
|
|
|
|
|
QUIZ {
|
|
|
|
uuid quizId PK
|
|
|
|
datetime dateOfCreation
|
|
|
|
uuid containsQuestionsId
|
|
|
|
int quizLenght
|
|
|
|
int pointMaximum
|
|
|
|
int pointEarned
|
|
|
|
int gradeGiven
|
|
|
|
datetime dateTimeStarted
|
|
|
|
datetime dateTimeFinished
|
|
|
|
time timeSpent
|
|
|
|
}
|
|
|
|
|
|
|
|
QUESTION {
|
|
|
|
uuid questionId PK
|
|
|
|
int questionNumber
|
|
|
|
int pointMaximum
|
|
|
|
int pointEarned
|
|
|
|
|
|
|
|
text questionTitle
|
|
|
|
enum questionType
|
|
|
|
text questionTextInput
|
|
|
|
text questionRadioInput
|
|
|
|
text questionCheckboxInput
|
|
|
|
text questionPairInput
|
|
|
|
text questionOderInput
|
|
|
|
* questionFileInput
|
2024-09-07 12:30:46 +02:00
|
|
|
%% * = idk how this works
|
2024-09-07 12:29:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
"QUESTION-ANSWER" {
|
|
|
|
uuid questionId PK, FK
|
|
|
|
|
|
|
|
%% text doesn't need answer
|
|
|
|
text questionRadioAnswer
|
|
|
|
text questionCheckboxAnswer
|
|
|
|
text questionPairAnswer
|
|
|
|
text questionOrderAnswer
|
|
|
|
%% file doesn't need answer
|
|
|
|
}
|