Add repositories

This commit is contained in:
Dmitrii Cravcenco
2023-09-21 14:49:49 +03:00
parent 53ae0d502c
commit c0f3a7f7a7
5 changed files with 24 additions and 12 deletions

View File

@@ -12,8 +12,8 @@ public class User {
private long id;
private String name;
private String email;
private String login;
private String password;
@Enumerated(EnumType.STRING)
private Role role;
@OneToMany(mappedBy = "user")
@@ -22,11 +22,10 @@ public class User {
@OneToMany(mappedBy = "user")
private List<Income> incomes;
public User(long id, String name, String email, String login, String password, Role role, List<Expense> expenses, List<Income> incomes) {
public User(long id, String name, String email, String password, Role role, List<Expense> expenses, List<Income> incomes) {
this.id = id;
this.name = name;
this.email = email;
this.login = login;
this.password = password;
this.role = role;
this.expenses = expenses;
@@ -59,14 +58,6 @@ public class User {
this.email = email;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public String getPassword() {
return password;
}