package com.erp.report.dto;

import lombok.Data;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * 资金报表响应DTO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FinanceReportResponse {

    private FinanceSummary summary;

    private List<FinanceStatItem> list;

    private PaginationInfo pagination;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class FinanceSummary {
        private BigDecimal totalIncome;
        private BigDecimal totalExpense;
        private BigDecimal netProfit;
        private Long orderCount;
        private Long poCount;
        private BigDecimal freightIncome;
        private BigDecimal freightExpense;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class FinanceStatItem {
        private String date;
        private BigDecimal income;
        private BigDecimal expense;
        private BigDecimal netProfit;
        private Long orderCount;
        private Long poCount;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PaginationInfo {
        private Integer currentPage;
        private Integer perPage;
        private Long total;
        private Integer lastPage;
    }
}
