You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
1.8 KiB
97 lines
1.8 KiB
@startuml
|
|
|
|
class Account {
|
|
- email: String
|
|
- phoneNumber: String
|
|
- id: int
|
|
|
|
+ setMailAddress(String)
|
|
+ getMailAddress(): String
|
|
+ getPhoneNumber(): String
|
|
+ setPhoneNumber(String)
|
|
+ getUser(): AccountUser
|
|
+ getId(): int
|
|
}
|
|
|
|
Account --> "- user" AccountUser
|
|
Account --> "- teams *" Team
|
|
|
|
interface User {
|
|
+ getName(): String
|
|
+ getProfilePicture(): Url
|
|
+ getAge(): int
|
|
}
|
|
|
|
class AccountUser {
|
|
- name: String
|
|
- profilePicture: Url
|
|
- age: int
|
|
|
|
+ setName(String)
|
|
+ setProfilePicture(URI)
|
|
+ setAge(int)
|
|
}
|
|
AccountUser ..|> User
|
|
|
|
class Member {
|
|
- userId: int
|
|
|
|
+ getUserId(): int
|
|
+ getRole(): MemberRole
|
|
}
|
|
|
|
Member --> "- role" MemberRole
|
|
|
|
enum MemberRole {
|
|
PLAYER
|
|
COACH
|
|
}
|
|
|
|
class Team {
|
|
- name: String
|
|
- picture: Url
|
|
|
|
+ getName(): String
|
|
+ getPicture(): Url
|
|
+ getMainColor(): Color
|
|
+ getSecondColor(): Color
|
|
+ listMembers(): array<Member>
|
|
}
|
|
|
|
Team --> "- mainColor" Color
|
|
Team --> "- secondaryColor" Color
|
|
Team --> "- members *" Member
|
|
|
|
class Color {
|
|
- value: int
|
|
|
|
+ getValue(): int
|
|
}
|
|
|
|
class AuthController{
|
|
|
|
+ displayRegister() : HttpResponse
|
|
+ displayBadFields(viewName : string, fails : array) : HttpResponse
|
|
+ confirmRegister(request : array) : HttpResponse
|
|
+ displayLogin() : HttpResponse
|
|
+ confirmLogin() : HttpResponse
|
|
}
|
|
AuthController --> "- model" AuthModel
|
|
|
|
class AuthModel{
|
|
|
|
+ register(username : string, password : string, confirmPassword : string, email : string): array
|
|
+ getAccount(email : string):array
|
|
+ login(email : string, password : string)
|
|
}
|
|
AuthModel --> "- gateway" AuthGateway
|
|
|
|
class AuthGateway{
|
|
-con : Connection
|
|
|
|
+ mailExists(email : string) : bool
|
|
+ insertAccount(username : string, hash : string, email : string)
|
|
+ getHash(email : string):string
|
|
+ getAccount (email : string): array
|
|
}
|
|
@enduml |