Revize 21d41302
Přidáno uživatelem Michal Linha před asi 4 roky(ů)
src/main/java/vldc/aswi/domain/User.java | ||
---|---|---|
10 | 10 |
import java.util.List; |
11 | 11 |
|
12 | 12 |
/** |
13 |
* Domain entity representing User in application. User is used for loging into application. |
|
13 |
* Domain entity representing User in application. User is used for logging into application.
|
|
14 | 14 |
*/ |
15 | 15 |
@Entity(name = "Uzivatel") |
16 | 16 |
@Data |
... | ... | |
18 | 18 |
@NoArgsConstructor |
19 | 19 |
public class User extends EntityParent { |
20 | 20 |
|
21 |
/** Username of user. */ |
|
22 |
@Column(name = "jmeno") |
|
21 | 23 |
private String username; |
22 | 24 |
|
25 |
/** Password of the user. */ |
|
26 |
@Column(name = "heslo") |
|
23 | 27 |
private String password; |
24 | 28 |
|
29 |
/** Role of user. */ |
|
25 | 30 |
@ManyToOne(fetch=FetchType.LAZY) |
26 | 31 |
@JoinColumn(name = "role_id") |
27 | 32 |
private Role role; |
28 | 33 |
|
34 |
/** List of user configurations. */ |
|
29 | 35 |
@OneToMany(mappedBy = "user") |
30 | 36 |
private List<Configuration> configurations; |
31 | 37 |
|
32 |
|
|
38 |
/** |
|
39 |
* Constructor. |
|
40 |
* @param username username of user |
|
41 |
* @param password password of user |
|
42 |
*/ |
|
33 | 43 |
public User(String username, String password) { |
34 | 44 |
this.setUsername(username); |
35 | 45 |
this.setPassword(password); |
Také k dispozici: Unified diff
re #7839 Repositories with basic methods created, domain class attributes mapped to names from database, services with basic methods created