package com.erp.tenant.dto.tenant;

import com.erp.tenant.dto.report.AlertDTO;
import com.erp.tenant.entity.order.Order;
import com.erp.tenant.entity.report.ReportSummary;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * Dashboard首页响应DTO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DashboardResponse {

    /** 核心统计摘要 */
    private ReportSummary summary;

    /** 预警列表 */
    private List<AlertDTO> alerts;

    /** 近期订单 */
    private List<OrderListItem> recentOrders;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class OrderListItem {
        private Long id;
        private String orderSn;
        private String platform;
        private String shopName;
        private String erpStatus;
        private String erpStatusText;
        private String receiverName;
        private String receiverPhone;
        private java.math.BigDecimal totalAmount;
        private Integer itemCount;
        private String paymentTime;
        private String warehouseName;
        private String logisticsCompany;
        private String logisticsNo;
    }
}
