package com.jeesharp.business.modules.mall.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

/**
 * 小程序运费试算结果。
 *
 * @author jeesharp
 * @since 2026-05-16
 */
@Data
@Schema(description = "商城运费试算结果")
public class MallFreightPreviewVO {

    @Schema(description = "商品金额合计（元），与提交订单时按 SKU 单价×件数汇总一致")
    private BigDecimal goodsAmount;

    @Schema(description = "应付运费（元），与下单时服务端写入 mall_order.freight_amount 一致")
    private BigDecimal freightAmount;

    @Schema(description = "首单立减金额（元），非首单或无配置时为 0")
    private BigDecimal firstOrderDiscountAmount;

    @Schema(description = "优惠券抵扣金额（元），未选券时为 0")
    private BigDecimal couponDiscountAmount;

    @Schema(description = "商户券抵扣合计（元）")
    private BigDecimal merchantCouponAmount;

    @Schema(description = "平台券抵扣合计（元）")
    private BigDecimal platformCouponAmount;

    @Schema(description = "按商户拆分明细")
    private java.util.List<MallFreightMerchantBreakdownVO> merchantBreakdown;

    @Schema(description = "应付总额（元）= 商品金额 + 运费 - 首单立减 - 优惠券抵扣")
    private BigDecimal payAmount;
}
