Merge branch 'master' of https://github.com/lumijiez/ExpenseTrackerFAF into front-v3
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -13,6 +13,7 @@ import java.time.LocalDate;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Entity(name = "incomes")
|
||||
@Builder
|
||||
public class Income implements IMoneyTransaction {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user