#10 Create period overview
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package de.financer.dto;
|
||||
|
||||
public enum AssetTrend {
|
||||
UP,
|
||||
DOWN,
|
||||
EQUAL;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user