diff --git a/Conception.md b/Conception.md index 1f576c2..3115c30 100644 --- a/Conception.md +++ b/Conception.md @@ -1 +1,57 @@ -Bienvenue sur le Wiki. \ No newline at end of file +```plantuml +@startuml +class User { + + name : string +} + +User "1" --> "*" User: friends +User "1" --> "*" Notification: notifications +User "1" --> "*" Ask: friendRequests +class Notification { + - text : string +} + +interface INotifier { + + notify() : void +} + +INotifier --|> Observer + +abstract class UserManager { + - currentUser : User + + deleteFriend(userId : int) : void + + addFriend(userId : int) : void + + respondToFriendRequest(requestId : int, choice : bool) : void + + getFriends(userId : int) : User[] +} + +class Ask { + - fromUser : int + - toUser : int +} + +Ask --|> Subject + +abstract class Subject { + + attach(o : Observer) : void + + detach(o : Observer) : void + + notify() : void +} + +Subject "1" --> "*" Observer +interface Observer { + + update() : void +} + +UserManager ..> User +UserManager o-- IUserRepository +UserManager o-- INotifier + +interface IUserRepository { + + findByUsername(username : string) : User + + addUser(user : User) : bool +} + +IUserRepository ..> User +@enduml +``` \ No newline at end of file