diff --git a/Documentation/diagClasse.md b/Documentation/diagClasse.md index bc4d5f5..0e8ee31 100644 --- a/Documentation/diagClasse.md +++ b/Documentation/diagClasse.md @@ -1,5 +1,4 @@ -'''plantuml - +```plantuml @startuml IEP hide circle @@ -14,10 +13,10 @@ skinparam BackgroundColor #white namespace Model #lightgrey{ abstract Class AbsModel{ - - gtw : AbsGateway - role : string - + connection() : void - + deconnection() : void + + connection(login: string, password: string) : void + + deconnection() + + {abstract} is() } abstract Class User { @@ -30,25 +29,110 @@ namespace Model #lightgrey{ - image : string - extraTime : bool - group : int + - roles : array + User(id : int, password : string, email : string, string name, string surname, string nickname, string image, bool extraTime, int group) } - Class StudentModel { - + action() : void + Class MdlAdmin{ + + getAllUsers() : array + + getAllAdmins() : array + + getAllTeachers() : array + + getAllStudents() : array + + getAllGroups() : array + + removeUser(id: int) : void + + getUsersOfGroup(id: int) : array + + removeUserFromGroup(id: int) : void + + removeGroup(id: int) : void + + addGroup(num: int, year: int, sector: string) : int + + addUserToGroup(user: int, group: int) : void + + getUnassignedUsers(): array + } + + Class MdlStudent{ + + getAll() : array + + getVocabByNale(name: string) : array + + getUser(id: int) : User + + modifyNickname(id: int, newNickname: string) : void + + modifyPassword(id: int, newPassword: string) : void + } + + Class MdlTeacher{ + + getAll() : array + + getAllStudent() : array + + getVocabByName(name: string) : array + + RemoveVocById(id: int) : void + } + + Class Translation{ + - id : int + - word1 : string + - word2 : string + - listVocab : int + + + Translation(id : int, word1 : string, word2 : string, listVocab : int) + } + + Class Group{ + - id : int + - num : int + - year : int + - sector : string + + + Group(id : int, num : int, year : int, sector : string) + } + + Class VocabularyList{ + - id : int + - name : string + - image : string + - aut : string + + + VocabularyList(id : int, name : string, image : string, aut : string) } - AbsModel *--> Gateway.AbsGateway - AbsModel <|-- StudentModel + AbsModel *-> Gateway.AbsGateway + AbsModel <|-- MdlStudent + AbsModel <|-- MdlAdmin + AbsModel <|-- MdlTeacher } namespace Controller #lightgray{ - Class studentController { - - attribut - + fct() : void + Class AdminController{ + + showAllUsers() : void + + showAllAdmins() : void + + showAllTeachers() : void + + showAllStudents() : void + + showAllGroups() : void + + removeUser() : void + + showGroupDetails() : void + + removeUserFromGroup() : void + + removeGroup() : void + + addGroup() : void + + addUserToGroup() : void + } + + Class StudentController{ + + affAllVocab() : void + + affAllStudent() : void + + getByName() : void + + showAccountInfos() : void + + modifyNickname() : void + + modifyPassword() : void } + + Class TeacherController{ + + affAllStudent() : void + + affAllVocab() : void + + getByName() : void + + DelById() : void + } + + Model.MdlTeacher <-- TeacherController + Model.MdlStudent <-- StudentController + Model.MdlAdmin <-- AdminController } @@ -56,8 +140,22 @@ namespace Config #lightgray{ Class Connection { - stmt + executeQuery(query : string, parameters : array) : bool - + getResult() : array + + getResult() : array } + + Class Validation{ + + {static} val_action(action) : string + + {static} val_password(value) : string + + {static} filter_int(value) : int + + {static} filter_str_simple(value) : string + + {static} filter_str_nospecialchar(value) : string + } + + Connection *--> Gateway.AbsGateway + + Validation <-- Controller.AdminController + Validation <-- Controller.StudentController + Validation <-- Controller.TeacherController } namespace Gateway #lightgray{