package com.liquidnet.common.third.sqb.param.response.data;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

/**
 * 创建微信预支付订单响应
 */

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CreateWechatPrepayOrderData {

    /**
     * 收单号
     */
    private String acquiringSn;

    /**
     * 收单签名
     */
    private String signature;

    /**
     * 收单状态
     */
    private Byte acquiringState;

    /**
     * 金额明细
     */
    private AmountDetails amount;

    /**
     * 支付凭证
     */
    private PaymentVoucher paymentVoucher;

    /**
     * 通道信息
     */
    private ChannelInfo channelInfo;

    /**
     * 订单金额明细
     */
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class AmountDetails {

        /**
         * 收单总金额
         */
        private Long totalAmount;

        /**
         * 已付总金额
         */
        private Long paidAmount;

        /**
         * 已退总金额
         */
        private Long refundedAmount;
    }

    /**
     * 支付凭证详情
     */
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class PaymentVoucher {

        /**
         * 时间戳
         */
        private String timeStamp;

        /**
         * 订单详情扩展字符串
         */
        private String packageStr;

        /**
         * 签名
         */
        private String paySign;

        /**
         * Appid
         */
        private String appId;

        /**
         * 签名方式
         */
        private String signType;

        /**
         * 随机字符串
         */
        private String nonceStr;
    }


    /**
     * 通道信息详情
     */
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class ChannelInfo {

        /**
         * 收钱吧通道流水号
         */
        private String payTsn;
    }


}
