#10 Create period overview

This commit is contained in:
2021-03-04 20:12:59 +01:00
parent 33a6fa2806
commit 4e7717f1e3
19 changed files with 85 additions and 40 deletions

View File

@@ -0,0 +1,7 @@
package de.financer.dto;
public enum AssetTrend {
UP,
DOWN,
EQUAL;
}

View File

@@ -15,6 +15,7 @@ public class PeriodOverviewDto {
private Long liabilitySum;
private Long total;
private Long assetsSum;
private AssetTrend assetTrend;
private Long transactionCount;
public PeriodOverviewDto() {
@@ -30,6 +31,7 @@ public class PeriodOverviewDto {
Long liabilitySum,
Long total,
Long assetsSum,
String assetTrend,
Long transactionCount) {
this.periodId = periodId;
this.periodType = PeriodType.valueOf(periodType);
@@ -40,6 +42,7 @@ public class PeriodOverviewDto {
this.liabilitySum = liabilitySum;
this.total = total;
this.assetsSum = assetsSum;
this.assetTrend = assetTrend != null ? AssetTrend.valueOf(assetTrend) : null;
this.transactionCount = transactionCount;
}
@@ -127,4 +130,12 @@ public class PeriodOverviewDto {
public void setTransactionCount(Long transactionCount) {
this.transactionCount = transactionCount;
}
public AssetTrend getAssetTrend() {
return assetTrend;
}
public void setAssetTrend(AssetTrend assetTrend) {
this.assetTrend = assetTrend;
}
}

View File

@@ -22,6 +22,7 @@ import java.time.LocalDateTime;
@ColumnResult(name = "LIABILITY_SUM", type = Long.class),
@ColumnResult(name = "TOTAL", type = Long.class),
@ColumnResult(name = "ASSETS_SUM", type = Long.class),
@ColumnResult(name = "ASSET_TREND", type = String.class),
@ColumnResult(name = "TRANSACTION_COUNT", type = Long.class)})
})
public class Period {