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

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

/**
 * 商城订单预支付响应，字段与微信 JSAPI 调起参数对齐，供网关 {@code WechatJsapiPayOrderPrepayService} 回填。
 *
 * @author jeesharp
 * @since 2026-05-08
 */
@Data
@Schema(description = "商城订单预支付响应")
public class MallPayPrepareVO {

    @Schema(description = "业务支付维度 ID（合并支付时为 batchId，单订单时为 mall_order.id）")
    private String orderId;

    @Schema(description = "合并支付批次主键（单订单支付时为空）")
    private String batchId;

    @Schema(description = "业务订单号（order_no 或 batch_no）")
    private String tradeOrderId;

    @Schema(description = "微信商户订单号（财务支付单 out_trade_no，预下单后由网关覆盖）")
    private String outTradeNo;

    @Schema(description = "微信 attach（JSON）")
    private String attach;

    @Schema(description = "商品描述")
    private String description;

    @Schema(description = "支付金额，单位分")
    private Long amountFen;

    @Schema(description = "业务侧支付流水号（预支付阶段生成，写入 attach）")
    private String payOrderId;

    @Schema(description = "支付渠道")
    private String payChannel;

    @Schema(description = "支付状态（业务语义，占位）")
    private String payStatus;

    @Schema(description = "过期时间展示")
    private String expireTime;

    @Schema(description = "小程序 appId")
    private String appId;

    @Schema(description = "时间戳")
    private String timeStamp;

    @Schema(description = "随机串")
    private String nonceStr;

    @Schema(description = "订单详情扩展（prepay_id=）")
    private String packageValue;

    @Schema(description = "签名类型")
    private String signType;

    @Schema(description = "支付签名")
    private String paySign;

    @Schema(description = "付款人 openid")
    private String payerOpenId;

    @Schema(description = "租户 ID（多租户支付配置）")
    private String tenantId;

    @Schema(description = "结算模式：PLATFORM_COLLECT、WECHAT_PROFIT_SHARING")
    private String settleMode;

    @Schema(description = "是否在微信下单标记 profit_sharing")
    private Boolean needProfitSharing;

    @Schema(description = "子单支付明细（partner/合单路由）")
    private java.util.List<MallPaySubItemVO> subPayItems;
}
