Compare commits
11 Commits
e8eef1aa73
...
e361e02aa8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e361e02aa8 | ||
|
|
837a82ef9a | ||
| 38b2c1b2cb | |||
| 16477f4ba1 | |||
| ad717036b4 | |||
| c7098f2ec3 | |||
| 67cd3e27ca | |||
| b2662693c2 | |||
|
|
40ada62856 | ||
| acd31c9f2a | |||
| 842f2b55f8 |
@@ -0,0 +1,20 @@
|
||||
package com.example.demo.app.domain.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class AnalysisModel {
|
||||
|
||||
private Integer currentMonthTotalAmount;
|
||||
|
||||
private Integer previousMonthTotalAmount;
|
||||
|
||||
private Integer totalDifferenceAmount;
|
||||
|
||||
private List<CategoryAnalysisModel>
|
||||
categoryAnalysisModelList;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.example.demo.app.domain.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class CategoryAnalysisModel {
|
||||
|
||||
private String categoryName;
|
||||
|
||||
private Integer currentMonthAmount;
|
||||
|
||||
private Integer previousMonthAmount;
|
||||
|
||||
private Integer previousMonthDifferenceAmount;
|
||||
|
||||
private Integer courseLimitAmount;
|
||||
|
||||
private Integer courseDifferenceAmount;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.example.demo.app.infra.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import com.example.demo.app.infra.entity.AllocationEntity;
|
||||
|
||||
public interface AllocationRepository extends JpaRepository<AllocationEntity, Long>{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.example.demo.app.infra.repository;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import com.example.demo.app.infra.entity.AllocationEntity;
|
||||
import com.example.demo.app.infra.entity.TransactionEntity;
|
||||
import com.example.demo.app.infra.entity.UserEntity;
|
||||
|
||||
public interface AnalysisRepository {
|
||||
|
||||
List<TransactionEntity> findExpenseByPeriod(
|
||||
Integer userId,
|
||||
LocalDate startDate,
|
||||
LocalDate endDate);
|
||||
|
||||
List<AllocationEntity> findAllocationByCourseId(
|
||||
Integer courseId);
|
||||
|
||||
UserEntity findUserByUserId(
|
||||
Integer userId);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.example.demo.app.infra.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import com.example.demo.app.infra.entity.CategoryEntity;
|
||||
|
||||
public interface CategoryRepository extends JpaRepository<CategoryEntity, Long> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.example.demo.app.infra.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import com.example.demo.app.infra.entity.CourseEntity;
|
||||
|
||||
public interface CourseRepository extends JpaRepository<CourseEntity, Long> {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user