package com.jeesharp.business.modules.finance.merchantsettlement.vo;

import com.jeesharp.framework.pojo.vo.BaseInfoVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * 商户结算单详情 VO，含打款记录列表。
 *
 * @author jeesharp
 * @since 2026-06-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "商户结算单详情VO")
public class MerchantSettlementBillInfoVO extends BaseInfoVO {

    @Schema(description = "结算单号")
    private String settlementNo;

    @Schema(description = "商户租户ID")
    private String merchantTenantId;

    @Schema(description = "结算模式")
    private String settleMode;

    @Schema(description = "账期开始")
    private LocalDateTime periodStart;

    @Schema(description = "账期结束")
    private LocalDateTime periodEnd;

    @Schema(description = "收款笔数")
    private Long payCount;

    @Schema(description = "退款笔数")
    private Long refundCount;

    @Schema(description = "收款基数合计")
    private BigDecimal payBaseAmount;

    @Schema(description = "退款冲减合计")
    private BigDecimal refundBaseAmount;

    @Schema(description = "平台佣金净额")
    private BigDecimal netCommissionAmount;

    @Schema(description = "应付商户净额")
    private BigDecimal netMerchantAmount;

    @Schema(description = "已打款累计")
    private BigDecimal paidAmount;

    @Schema(description = "状态")
    private String status;

    @Schema(description = "状态名称")
    private String statusName;

    @Schema(description = "商户确认人")
    private String merchantConfirmBy;

    @Schema(description = "商户确认时间")
    private LocalDateTime merchantConfirmDate;

    @Schema(description = "打款记录")
    private List<MerchantSettlementPayoutListVO> payouts;

    @Schema(description = "构成明细笔数（PAY+REFUND）")
    private Long lineCount;

    @Schema(description = "是否含固化明细（历史单可能为 false）")
    private Boolean hasLineSnapshot;
}
