package com.jeesharp.business.modules.pay.route;

import com.jeesharp.business.modules.pay.paywechatconfig.entity.PayWechatConfig;
import com.jeesharp.business.modules.pay.paywechatconfig.enums.WechatPayModeEnum;
import com.jeesharp.business.modules.pay.paywechatconfig.enums.WechatPayRouteTypeEnum;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 微信 JSAPI 预下单路由上下文：L1 支付模式、路由类型及已解析的子商户明细。
 *
 * @author jeesharp
 * @since 2026-06-12
 */
@Data
public class PayWechatPayRouteContext {

    private PayWechatConfig config;

    private WechatPayModeEnum wechatPayMode;

    private WechatPayRouteTypeEnum payRouteType;

    private String platformTenantId;

    private List<ResolvedSubPayItem> subPayItems = new ArrayList<>();

    /**
     * 已解析 sub_mchid 的子单。
     */
    @Data
    public static class ResolvedSubPayItem {

        private String merchantTenantId;

        private String subMchId;

        private String bizOrderId;

        private int amountFen;

        private String description;

        private String attach;

        private boolean profitSharing;

        private String subOutTradeNo;
    }
}
