diff --git a/src/main/java/org/example/petshopdesktop/api/dto/analytics/DashboardResponse.java b/src/main/java/org/example/petshopdesktop/api/dto/analytics/DashboardResponse.java index 0497f48e..1b29b2b3 100644 --- a/src/main/java/org/example/petshopdesktop/api/dto/analytics/DashboardResponse.java +++ b/src/main/java/org/example/petshopdesktop/api/dto/analytics/DashboardResponse.java @@ -4,46 +4,36 @@ import java.math.BigDecimal; import java.util.List; public class DashboardResponse { - private BigDecimal totalRevenue; - private Long totalSales; - private Long totalCustomers; - private Long totalProducts; - private List dailySales; + private SalesSummary salesSummary; + private InventorySummary inventorySummary; private List topProducts; + private List dailySales; public DashboardResponse() { } - public BigDecimal getTotalRevenue() { - return totalRevenue; + public SalesSummary getSalesSummary() { + return salesSummary; } - public void setTotalRevenue(BigDecimal totalRevenue) { - this.totalRevenue = totalRevenue; + public void setSalesSummary(SalesSummary salesSummary) { + this.salesSummary = salesSummary; } - public Long getTotalSales() { - return totalSales; + public InventorySummary getInventorySummary() { + return inventorySummary; } - public void setTotalSales(Long totalSales) { - this.totalSales = totalSales; + public void setInventorySummary(InventorySummary inventorySummary) { + this.inventorySummary = inventorySummary; } - public Long getTotalCustomers() { - return totalCustomers; + public List getTopProducts() { + return topProducts; } - public void setTotalCustomers(Long totalCustomers) { - this.totalCustomers = totalCustomers; - } - - public Long getTotalProducts() { - return totalProducts; - } - - public void setTotalProducts(Long totalProducts) { - this.totalProducts = totalProducts; + public void setTopProducts(List topProducts) { + this.topProducts = topProducts; } public List getDailySales() { @@ -54,11 +44,78 @@ public class DashboardResponse { this.dailySales = dailySales; } - public List getTopProducts() { - return topProducts; + public static class SalesSummary { + private BigDecimal totalRevenue; + private Long totalSales; + private BigDecimal totalRefunds; + private Long totalRefundCount; + + public SalesSummary() { + } + + public BigDecimal getTotalRevenue() { + return totalRevenue; + } + + public void setTotalRevenue(BigDecimal totalRevenue) { + this.totalRevenue = totalRevenue; + } + + public Long getTotalSales() { + return totalSales; + } + + public void setTotalSales(Long totalSales) { + this.totalSales = totalSales; + } + + public BigDecimal getTotalRefunds() { + return totalRefunds; + } + + public void setTotalRefunds(BigDecimal totalRefunds) { + this.totalRefunds = totalRefunds; + } + + public Long getTotalRefundCount() { + return totalRefundCount; + } + + public void setTotalRefundCount(Long totalRefundCount) { + this.totalRefundCount = totalRefundCount; + } } - public void setTopProducts(List topProducts) { - this.topProducts = topProducts; + public static class InventorySummary { + private Long totalProducts; + private Long lowStockProducts; + private Long outOfStockProducts; + + public InventorySummary() { + } + + public Long getTotalProducts() { + return totalProducts; + } + + public void setTotalProducts(Long totalProducts) { + this.totalProducts = totalProducts; + } + + public Long getLowStockProducts() { + return lowStockProducts; + } + + public void setLowStockProducts(Long lowStockProducts) { + this.lowStockProducts = lowStockProducts; + } + + public Long getOutOfStockProducts() { + return outOfStockProducts; + } + + public void setOutOfStockProducts(Long outOfStockProducts) { + this.outOfStockProducts = outOfStockProducts; + } } } diff --git a/src/main/java/org/example/petshopdesktop/api/dto/purchaseorder/PurchaseOrderResponse.java b/src/main/java/org/example/petshopdesktop/api/dto/purchaseorder/PurchaseOrderResponse.java index e9148015..4b96eedc 100644 --- a/src/main/java/org/example/petshopdesktop/api/dto/purchaseorder/PurchaseOrderResponse.java +++ b/src/main/java/org/example/petshopdesktop/api/dto/purchaseorder/PurchaseOrderResponse.java @@ -4,7 +4,7 @@ import java.math.BigDecimal; import java.time.LocalDate; public class PurchaseOrderResponse { - private Long id; + private Long purchaseOrderId; private String supplierName; private LocalDate orderDate; private LocalDate expectedDeliveryDate; @@ -14,12 +14,12 @@ public class PurchaseOrderResponse { public PurchaseOrderResponse() { } - public Long getId() { - return id; + public Long getPurchaseOrderId() { + return purchaseOrderId; } - public void setId(Long id) { - this.id = id; + public void setPurchaseOrderId(Long purchaseOrderId) { + this.purchaseOrderId = purchaseOrderId; } public String getSupplierName() { diff --git a/src/main/java/org/example/petshopdesktop/api/dto/sale/SaleResponse.java b/src/main/java/org/example/petshopdesktop/api/dto/sale/SaleResponse.java index 13444fb8..7ee8eb45 100644 --- a/src/main/java/org/example/petshopdesktop/api/dto/sale/SaleResponse.java +++ b/src/main/java/org/example/petshopdesktop/api/dto/sale/SaleResponse.java @@ -5,7 +5,7 @@ import java.time.LocalDateTime; import java.util.List; public class SaleResponse { - private Long id; + private Long saleId; private String employeeName; private String storeName; private LocalDateTime saleDate; @@ -18,12 +18,12 @@ public class SaleResponse { public SaleResponse() { } - public Long getId() { - return id; + public Long getSaleId() { + return saleId; } - public void setId(Long id) { - this.id = id; + public void setSaleId(Long saleId) { + this.saleId = saleId; } public String getEmployeeName() {