|
|
@ -1,14 +1,15 @@
|
|
|
|
@startuml
|
|
|
|
@startuml
|
|
|
|
|
|
|
|
|
|
|
|
class Account {
|
|
|
|
class Account {
|
|
|
|
- email: String
|
|
|
|
- email: string
|
|
|
|
- phoneNumber: String
|
|
|
|
- phoneNumber: string
|
|
|
|
- id: int
|
|
|
|
- id: int
|
|
|
|
|
|
|
|
|
|
|
|
+ setMailAddress(String)
|
|
|
|
+ __construct (email : string, ???)
|
|
|
|
+ getMailAddress(): String
|
|
|
|
+ setMailAddress(string)
|
|
|
|
+ getPhoneNumber(): String
|
|
|
|
+ getMailAddress(): string
|
|
|
|
+ setPhoneNumber(String)
|
|
|
|
+ getPhoneNumber(): string
|
|
|
|
|
|
|
|
+ setPhoneNumber(string)
|
|
|
|
+ getUser(): AccountUser
|
|
|
|
+ getUser(): AccountUser
|
|
|
|
+ getId(): int
|
|
|
|
+ getId(): int
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -17,17 +18,18 @@ Account --> "- user" AccountUser
|
|
|
|
Account --> "- teams *" Team
|
|
|
|
Account --> "- teams *" Team
|
|
|
|
|
|
|
|
|
|
|
|
interface User {
|
|
|
|
interface User {
|
|
|
|
+ getName(): String
|
|
|
|
+ getName(): string
|
|
|
|
+ getProfilePicture(): Url
|
|
|
|
+ getProfilePicture(): Url
|
|
|
|
+ getAge(): int
|
|
|
|
+ getAge(): int
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class AccountUser {
|
|
|
|
class AccountUser {
|
|
|
|
- name: String
|
|
|
|
- name: string
|
|
|
|
- profilePicture: Url
|
|
|
|
- profilePicture: Url
|
|
|
|
- age: int
|
|
|
|
- age: int
|
|
|
|
|
|
|
|
|
|
|
|
+ setName(String)
|
|
|
|
+ __construct(name : string, age : int, profilePicture : string)
|
|
|
|
|
|
|
|
+ setName(string)
|
|
|
|
+ setProfilePicture(URI)
|
|
|
|
+ setProfilePicture(URI)
|
|
|
|
+ setAge(int)
|
|
|
|
+ setAge(int)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -36,6 +38,7 @@ AccountUser ..|> User
|
|
|
|
class Member {
|
|
|
|
class Member {
|
|
|
|
- userId: int
|
|
|
|
- userId: int
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ __construct(role : MemberRole)
|
|
|
|
+ getUserId(): int
|
|
|
|
+ getUserId(): int
|
|
|
|
+ getRole(): MemberRole
|
|
|
|
+ getRole(): MemberRole
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -48,10 +51,11 @@ enum MemberRole {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class Team {
|
|
|
|
class Team {
|
|
|
|
- name: String
|
|
|
|
- name: string
|
|
|
|
- picture: Url
|
|
|
|
- picture: Url
|
|
|
|
|
|
|
|
|
|
|
|
+ getName(): String
|
|
|
|
+ __construct(name : string, picture : string, mainColor : Color, secondColor : Color,members : array)
|
|
|
|
|
|
|
|
+ getName(): string
|
|
|
|
+ getPicture(): Url
|
|
|
|
+ getPicture(): Url
|
|
|
|
+ getMainColor(): Color
|
|
|
|
+ getMainColor(): Color
|
|
|
|
+ getSecondColor(): Color
|
|
|
|
+ getSecondColor(): Color
|
|
|
@ -59,7 +63,7 @@ class Team {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Team --> "- mainColor" Color
|
|
|
|
Team --> "- mainColor" Color
|
|
|
|
Team --> "- secondaryColor" Color
|
|
|
|
Team --> "- secondColor" Color
|
|
|
|
Team --> "- members *" Member
|
|
|
|
Team --> "- members *" Member
|
|
|
|
|
|
|
|
|
|
|
|
class Color {
|
|
|
|
class Color {
|
|
|
@ -70,6 +74,7 @@ class Color {
|
|
|
|
|
|
|
|
|
|
|
|
class AuthController{
|
|
|
|
class AuthController{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ __construct(model : AuthModel)
|
|
|
|
+ displayRegister() : HttpResponse
|
|
|
|
+ displayRegister() : HttpResponse
|
|
|
|
+ displayBadFields(viewName : string, fails : array) : HttpResponse
|
|
|
|
+ displayBadFields(viewName : string, fails : array) : HttpResponse
|
|
|
|
+ confirmRegister(request : array) : HttpResponse
|
|
|
|
+ confirmRegister(request : array) : HttpResponse
|
|
|
@ -80,6 +85,7 @@ AuthController --> "- model" AuthModel
|
|
|
|
|
|
|
|
|
|
|
|
class AuthModel{
|
|
|
|
class AuthModel{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ __construct(gateway : AuthGateway)
|
|
|
|
+ register(username : string, password : string, confirmPassword : string, email : string): array
|
|
|
|
+ register(username : string, password : string, confirmPassword : string, email : string): array
|
|
|
|
+ getAccount(email : string):array
|
|
|
|
+ getAccount(email : string):array
|
|
|
|
+ login(email : string, password : string)
|
|
|
|
+ login(email : string, password : string)
|
|
|
@ -89,7 +95,8 @@ AuthModel --> "- gateway" AuthGateway
|
|
|
|
class AuthGateway{
|
|
|
|
class AuthGateway{
|
|
|
|
-con : Connection
|
|
|
|
-con : Connection
|
|
|
|
|
|
|
|
|
|
|
|
+ mailExists(email : string) : bool
|
|
|
|
+ __construct (con : Connection)
|
|
|
|
|
|
|
|
+ mailExist(email : string) : bool
|
|
|
|
+ insertAccount(username : string, hash : string, email : string)
|
|
|
|
+ insertAccount(username : string, hash : string, email : string)
|
|
|
|
+ getHash(email : string):string
|
|
|
|
+ getHash(email : string):string
|
|
|
|
+ getAccount (email : string): array
|
|
|
|
+ getAccount (email : string): array
|
|
|
|