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.
Application-Web/Documentation/models.puml

104 lines
2.2 KiB

@startuml
class Account {
- email: string
- phoneNumber: string
- id: int
+ __construct (email : string, ???)
+ 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
+ __construct(name : string, age : int, profilePicture : string)
+ setName(string)
+ setProfilePicture(URI)
+ setAge(int)
}
AccountUser ..|> User
class Member {
- userId: int
+ __construct(role : MemberRole)
+ getUserId(): int
+ getRole(): MemberRole
}
Member --> "- role" MemberRole
enum MemberRole {
PLAYER
COACH
}
class Team {
- name: string
- picture: Url
+ __construct(name : string, picture : string, mainColor : Color, secondColor : Color,members : array)
+ getName(): string
+ getPicture(): Url
+ getMainColor(): Color
+ getSecondColor(): Color
+ listMembers(): array<Member>
}
Team --> "- mainColor" Color
Team --> "- secondColor" Color
Team --> "- members *" Member
class Color {
- value: int
+ getValue(): int
}
class AuthController{
+ __construct(model : AuthModel)
+ displayRegister() : HttpResponse
+ displayBadFields(viewName : string, fails : array) : HttpResponse
+ confirmRegister(request : array) : HttpResponse
+ displayLogin() : HttpResponse
+ confirmLogin() : HttpResponse
}
AuthController --> "- model" AuthModel
class AuthModel{
+ __construct(gateway : AuthGateway)
+ 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
+ __construct (con : Connection)
+ mailExist(email : string) : bool
+ insertAccount(username : string, hash : string, email : string)
+ getHash(email : string):string
+ getAccount (email : string): array
}
@enduml