package com.jeesharp.business.modules.pay.paytype.pufapay.order.dto;

import com.jeesharp.business.modules.pay.constant.PayMessage;
import lombok.Data;

/**
 * 调用“APP支付交易”API，完成微信渠道或支付宝渠道的统一下单、发起支付等，实现APP支付功能。
 * @Author: wangmeng
 * @CreateTime: 2023-05-17  15:35
 * @Description: APP支付交易提交报文
 */
@Data
public class AppPayTrade extends AppBaseReq{

    private String requestMethod="POST";

    @PayMessage(name = "子商户公众账号ID", value = "subMechNoAcctID", isMax = true, maxLength = 32,
            description = "微信JSAPI/微信APP预下单必传")
    private String subMechNoAcctID;

    @PayMessage(name = "商家数据包", value = "busnPckt", isMax = true, maxLength = 128,
            description = "微信JSAPI/微信APP异步通知返回")
    private String busnPckt;

    @PayMessage(name = "交易创建时间", value = "createTimep", isMax = true, maxLength = 14,
            description = "订单生成时间，格式为 yyyyMMddHHmmss")
    private String createTimep;

    @PayMessage(name = "交易结束时间", value = "trnsFnshStrtTm", isMax = true, maxLength = 14,
            description = "格式为yyyyMMddHHmmss，微信/支付宝/银联统一使用该字段")
    private String trnsFnshStrtTm;

    @PayMessage(name = "订单优惠标记", value = "ordDcnSign", isMax = true, maxLength = 32
            , description = "微信JSAPI/微信APP预下单必传")
    private String ordDcnSign;

    @PayMessage(name = "指定支付方式", value = "apndPyMd", isMax = true, maxLength = 32)
    private String apndPyMd;

    @PayMessage(name = "用户标识", value = "usrFlg", isMax = true, maxLength = 128
            , description = "微信公众号支付时，用户在appid下的唯一标识。")
    private String usrFlg;

    @PayMessage(name = "用户子标识", value = "usrChildFlg", isMax = true, maxLength = 128
            , description = "trade_type=JSAPI，此参数必传，用户在子商户appid下的唯一标识。openid和sub_openid可以选传其中之一，如果选择传sub_openid,则必" +
            "须传sub_appid。下单前需要调用【网页授权获取用户信息】接口获取到用户的Openid。和subMechNoAcctID配套使用。")
    private String usrChildFlg;

    @PayMessage(name = "场景信息", value = "lSroInfo", isMax = true, maxLength = 128
            , description = "包含门店号和门店名称")
    private String lSroInfo;

    @PayMessage(name = "订单标题", value = "ordTtl", isMax = true, maxLength = 64
            , description = "新增该字段，支付宝必输，微信无需上送")
    private String ordTtl;

    @PayMessage(name = "卖家的支付宝用户id", value = "sellrAlpayID", isMax = true, maxLength = 28
            , description = "卖家的支付宝用户id")
    private String sellrAlpayID;

    @PayMessage(name = "买家的支付宝用户id", value = "byrAlpayID", isMax = true, maxLength = 28
            , description = "买家的支付宝用户id")
    private String byrAlpayID;

    @PayMessage(name = "买家的支付宝账号", value = "byrOfAlipayAcctNO", isMax = true, maxLength = 100
            , description = "买家支付宝账号，和buyer_id不能同时为空")
    private String byrOfAlipayAcctNO;

    @PayMessage(name = "参与优惠计算的金额", value = "avlDsntAmnt", isMax = true, maxLength = 12)
    private String avlDsntAmnt;

    @PayMessage(name = "不参与优惠计算的金额", value = "noPcpPrefClcAmt", isMax = true, maxLength = 12)
    private String noPcpPrefClcAmt;

    @PayMessage(name = "支付宝的店铺编号", value = "strID", isMax = true, maxLength = 32)
    private String strID;

    @PayMessage(name = "业务扩展参数", value = "bsnExnParm", isMax = true, maxLength = 128
            , description = "（花呗支付相关信息），预留")
    private String bsnExnParm;

    @PayMessage(name = "允许的最晚付款时间", value = "ltstPyTm", isMax = true, maxLength = 6
            , description = "该笔订单允许的最晚付款时间，逾期将关闭交易。取值范围：1m～15d。")
    private String ltstPyTm;

    @PayMessage(name = "描述分账信息", value = "dscClAcctInfo", isMax = true, maxLength = 128)
    private String dscClAcctInfo;

    @PayMessage(name = "可用渠道", value = "actCnl", isMax = true, maxLength = 128)
    private String actCnl;

    @PayMessage(name = "禁用支付渠道", value = "prhbtPayCnl", isMax = true, maxLength = 64)
    private String prhbtPayCnl;

    @PayMessage(name = "外部指定买家", value = "extApndByr", isMax = true, maxLength = 128)
    private String extApndByr;

    @PayMessage(name = "商户原始订单号", value = "mrchOrigOrdrNo", isMax = true, maxLength = 32
            , description = "透传，支付宝固定二维码支付字段")
    private String mrchOrigOrdrNo;

    @PayMessage(name = "商户原始订单号", value = "cmdtyCd", isMax = true, maxLength = 32
            , description = "对应微信扫码支付的商品代码，此参数必传。对应支付宝条码支付中的销售产品码，可选。")
    private String cmdtyCd;

    @PayMessage(name = "终端号", value = "terminalNo", isMax = true, maxLength = 64, must = "M"
            , description = "终端设备编号，浦发收单分配")
    private String terminalNo;

    @PayMessage(name = "商品描述", value = "cmdtyDsc", isMax = true, maxLength = 128, must = "M"
            , description = "微信的商品描述必填，支付宝的订单描述选填。微信格式要求：门店品牌名-城市分店名-实际商品名称")
    private String cmdtyDsc;

    @PayMessage(name = "商品详情", value = "cmdtyDtl", isMax = true, maxLength = 128
            , description = "微信包含单品优惠信息，所以该字段不送。支付宝透传。商品详情需要为json格式，支付宝与微信各不相同，联机不做任何校验，直接发送给第三方。")
    private String cmdtyDtl;

    @PayMessage(name = "交易金额", value = "tranAmt", isMax = true, maxLength = 12, must = "M"
            , description = "订单结算金额，单位：元")
    private String tranAmt;

    @PayMessage(name = "币种", value = "ccy", isMax = true, maxLength = 2
            , description = "目前只支持01-人民币")
    private String ccy;

    @PayMessage(name = "终端IP", value = "terminaIP", isMax = true, maxLength = 16
            , description = "调用微信支付机器的IPIPV6需放到comInPt字段")
    private String terminaIP;

    @PayMessage(name = "授权码", value = "authrCd", isMax = true, maxLength = 128
            , description = "微信刷卡支付必输，支付宝条码付必输。读取用户微信中的条码或者二维码信息")
    private String authrCd;

    @PayMessage(name = "商户通知地址", value = "mrchlInfmAdr", isMax = true, maxLength = 128, must = "C"
            , description = "异步通知地址默认为后台配置，无需上送。若回调地址为动态地址或其他特殊要求，可联系后台老师采用字段上送方式，此时该字段必输")
    private String mrchlInfmAdr;

    @PayMessage(name = "交易类型", value = "tranType", isMax = true, maxLength = 2
            , description = "订单支付模式：OA-微信公众号支付OB-微信动态扫码支付OC-微信刷卡支付OD-支付宝固定二维码支付" +
            "OE-支付宝动态扫码支付OF-支付宝条码支付OG-微信APP支付OH-微信H5支付(暂不支持)OK-聚合动态码支付OM-微信小程序支付" +
            "UA-银联扫码支付(被扫)UB-银联动态码支付(主扫)当交易类型为被扫(OC,OF,UA)时，可上送OC、OF和UA任意一值，收单系统会根据授权码信息判断并应答正确的交易类型。")
    private String tranType;

    @PayMessage(name = "商户号", value = "spdbMrchNo", isMax = true, maxLength = 15, must = "M"
            , description = "浦发收单给商户分配的特约商户号")
    private String spdbMrchNo;

    @PayMessage(name = "商户订单号", value = "frmrMrchOrdrNo", isMax = true, maxLength = 48
            , description = "商户系统的内部订单号")
    private String frmrMrchOrdrNo;

    @PayMessage(name = "商户时间", value = "mrchTm", isMax = true, maxLength = 14
            , description = "商户系统的交易时间，格式:yyyyMMddHHmmss")
    private String mrchTm;

    @PayMessage(name = "门店编号", value = "prblmNo", isMax = true, maxLength = 32, must = "M"
            , description = "商户门店编号")
    private String prblmNo;

    @PayMessage(name = "收银员编号", value = "cshrNo", isMax = true, maxLength = 32
            , description = "商户收银员编号")
    private String cshrNo;

    @PayMessage(name = "渠道号", value = "channelNo", isMax = true, maxLength = 2
            , description = "各渠道编号:00-线上(固定上传)")
    private String channelNo;

    @PayMessage(name = "备注1", value = "remark1", isMax = true, maxLength = 30
            , description = "备注及特殊说明")
    private String remark1;

    @PayMessage(name = "备注2", value = "remark2", isMax = true, maxLength = 100
            , description = "备注及特殊说明")
    private String remark2;

    @PayMessage(name = "实名支付", value = "pyInfoGth", isMax = true, maxLength = 200
            , description = "实名支付功能，用于公安和保险类商户使用，该字段为json格式对象")
    private String pyInfoGth;

    @PayMessage(name = "预授权确认模式", value = "prAuhrCtnMd", isMax = true, maxLength = 32
            , description = "授权转交易请求中传入，适用于预授权转交易业务使用。")
    private String prAuhrCtnMd;

    @PayMessage(name = "商户传入终端设备相关信息", value = "comInPt", isMax = true, maxLength = 128
            , description = "商户传入终端设备相关信息，具体值要和支付宝约定。(可传IPV6信息)")
    private String comInPt;

    @PayMessage(name = "商户传入的业务信息", value = "busInfo", isMax = true, maxLength = 128
            , description = "商户传入的业务信息，具体值要和支付宝约定，将商户传入信息分发给相应系统。")
    private String busInfo;

    @PayMessage(name = "网联IDC标识", value = "idcFlg", isMax = true, maxLength = 2
            , description = "网联IDC标识idc_flag")
    private String idcFlg;

    @PayMessage(name = "代扣业务需要传入协议相关信息", value = "infoDsc", isMax = true, maxLength = 256
            , description = "代扣业务需要传入协议相关信息")
    private String infoDsc;

    @PayMessage(name = "预授权号", value = "preAuthrNo", isMax = true, maxLength = 64
            , description = "预授权号")
    private String preAuthrNo;

    @PayMessage(name = "结算条款", value = "setlInfo", isMax = true, maxLength = 256
            , description = "结算条款")
    private String setlInfo;

    @PayMessage(name = "二维码最晚付款时间", value = "ltstPyTm1", isMax = true, maxLength = 6
            , description = "该笔订单允许的最晚付款时间，逾期将关闭交易，从生成二维码开始计时 取值范围：1m～15d。")
    private String ltstPyTm1;

    @PayMessage(name = "银联转接编号", value = "upMchID", isMax = true, maxLength = 32
            , description = "银联转接编号up_mch_id")
    private String upMchID;

    @PayMessage(name = "电子发票功能", value = "eInvActn", isMax = true, maxLength = 10
            , description = "电子发票功能,需要和公众平台的发票功能联合使用")
    private String eInvActn;

    @PayMessage(name = "营业机构号", value = "bussBranchId", isMax = true, maxLength = 4
            , description = "营业机构")
    private String bussBranchId;

    @PayMessage(name = "交易柜员", value = "tranTellerNo", isMax = true, maxLength = 8
            , description = "交易柜员")
    private String tranTellerNo;

    @PayMessage(name = "备用字段1", value = "rsrvFld1", isMax = true, maxLength = 100)
    private String rsrvFld1;

    @PayMessage(name = "备用字段2", value = "rsrvFld2", isMax = true, maxLength = 100)
    private String rsrvFld2;

    @PayMessage(name = "备用字段3", value = "rsrvFld3", isMax = true, maxLength = 100)
    private String rsrvFld3;

    @PayMessage(name = "备用字段4", value = "rsrvFld4", isMax = true, maxLength = 200)
    private String rsrvFld4;

    @PayMessage(name = "备用字段5", value = "rsrvFld5", isMax = true, maxLength = 200)
    private String rsrvFld5;

    @PayMessage(name = "备用字段6", value = "rsrvFld6", isMax = true, maxLength = 200)
    private String rsrvFld6;

    @PayMessage(name = "备用字段7", value = "rsrvFld7", isMax = true, maxLength = 512)
    private String rsrvFld7;

    @PayMessage(name = "备用字段8", value = "rsrvFld8", isMax = true, maxLength = 512)
    private String rsrvFld8;

    @PayMessage(name = "终端信息", value = "tmnlInfo", isMax = true, maxLength = 1024)
    private String tmnlInfo;

    @PayMessage(name = "扩展字段1", value = "extdFld1", isMax = true, maxLength = 1024
            , description = "服务商机构标识码")
    private String extdFld1;
}
