Merge branch 'master' of https://github.com/lumijiez/ExpenseTrackerFAF into front-v3

This commit is contained in:
2023-12-05 20:37:31 +02:00
6 changed files with 387 additions and 6 deletions

View File

@@ -4,10 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.persistence.*;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.*;
import java.math.BigDecimal;
import java.time.LocalDate;
@@ -16,6 +13,7 @@ import java.time.LocalDate;
@AllArgsConstructor
@NoArgsConstructor
@Entity(name = "expenses")
@Builder
public class Expense implements IMoneyTransaction {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)

View File

@@ -13,6 +13,7 @@ import java.time.LocalDate;
@AllArgsConstructor
@NoArgsConstructor
@Entity(name = "incomes")
@Builder
public class Income implements IMoneyTransaction {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)

View File

@@ -34,8 +34,8 @@ public class User {
private String username;
@Transient
@NotNull(message = "Password must not be null")
@NotEmpty(message = "Password must not be empty")
// @NotNull(message = "Password must not be null")
// @NotEmpty(message = "Password must not be empty")
private String password;
@OneToMany(mappedBy = "user", fetch = FetchType.LAZY)

View File

@@ -58,6 +58,7 @@ public class ExpenseService implements ITransactionService {
@Override
public List<Expense> getTransactionsByMonth(Month month) {
System.out.println(expenseRepository.filterByMonth(month.getValue()));
return expenseRepository.filterByMonth(month.getValue());
}