Model.puml
905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@startuml
class BaseEntity {
- Long id
}
class User {
- String firstname
- String lastname
}
class Profile {
- String username
- String passwordHash
- String salt
- PasswordHashAlgorithm hashAlgorithm
- String mailaddress
+ String setPassword(String password)
- String getPasswordHash()
+ boolean isValidPassword(String password)
- void setPasswordHash()
}
class Role {
- String name
- Collection<RightState> rights
}
class Address {
- String street
- String zipcode
- String city
- String country
}
enum PasswordHashAlgorithm {
SHA512
}
enum RightState {
NOT_LOGGED_IN
LOGGED_IN
ADMIN
}
BaseEntity <|-- User : MappedSuperClass
User "1" --> "0..1" Profile
User "1" --> "0..1" Address
Profile "*" --> "1" Role
Profile ..> "1" PasswordHashAlgorithm
Role "*" --> "1" Role : parent
Role ..> "*" RightState
@enduml