package com.jeequan.jeepay.thirdparty.channel.lklspay.model;

import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * TODO
 * 拉卡拉公共支付请求参数
 * @author crystal
 * @date 2023/6/2 17:48
 */
@Data
@NoArgsConstructor
public class LklPayThirdReq {

    public static final String VERSION = "3.0";

    /**
     * 请求时间，格式yyyyMMddHHmmss
     */
    private String req_time;

    /**
     * 3.0
     */
    private String version;

    /**
     * 开放平台APPID
     */
    private String out_org_code;

    /**
     * 参见各个接口的请求参数格式
     */
    private Object req_data;

    public LklPayThirdReq(String out_org_code , Object req_data) {
        this(out_org_code,VERSION);
        this.req_data = req_data;
    }

    public LklPayThirdReq(String out_org_code , String version, Object req_data) {
        this(out_org_code,version);
        this.req_data = req_data;
    }

    public LklPayThirdReq(String out_org_code, String version) {
        this.out_org_code = out_org_code;
        this.version = version;
        this.req_time = DateUtil.format(new DateTime(), DatePattern.PURE_DATETIME_FORMAT);
    }
}
