package com.faf223.expensetrackerfaf.model; import jakarta.persistence.*; import java.util.List; @Entity @Table(name = "User") public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long id; private String name; private String email; private String password; @Enumerated(EnumType.STRING) private Role role; @OneToMany(mappedBy = "user") private List expenses; @OneToMany(mappedBy = "user") private List incomes; public User(long id, String name, String email, String password, Role role, List expenses, List incomes) { this.id = id; this.name = name; this.email = email; this.password = password; this.role = role; this.expenses = expenses; this.incomes = incomes; } public User() {} public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Role getRole() { return role; } public void setRole(Role role) { this.role = role; } public List getExpenses() { return expenses; } public void setExpenses(List expenses) { this.expenses = expenses; } public List getIncomes() { return incomes; } public void setIncomes(List incomes) { this.incomes = incomes; } }