package com.njzscloud.common.wechat.param;

import cn.hutool.extra.spring.SpringUtil;
import com.njzscloud.common.wechat.config.WechatProperties;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

@Getter
@Setter
@ToString
@Accessors(chain = true)
public class Code2SessionParam {
    private String appid;
    private String secret;
    private String js_code;
    private String access_token;
    private String grant_type = "authorization_code";

    public Code2SessionParam() {
        WechatProperties wechatProperties = SpringUtil.getBean(WechatProperties.class);
        this.appid = wechatProperties.getAppId();
        this.secret = wechatProperties.getAppSecret();
    }
}
