package cn.newfeifan.mall.module.trade.utils.wechat;

import com.google.gson.JsonObject;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 微信模板消息
 */
@Data
public class WeChatTemplateMessage {
    private String touser;

    private String template_id;

    private String url;

    private MiniProgram miniprogram;

    private String client_msg_id;

    private JsonObject data;

    // Inner classes
    @lombok.Data
    @AllArgsConstructor
    public static class MiniProgram {
        private String appid;
        private String pagepath;
    }


    public String toString(){
        return "{\"touser\":\"" + touser + "\",\"template_id\":\"" + template_id + "\",\"url\":\"" + url + "\",\"client_msg_id\":\"" + client_msg_id + "\",\"data\":" + data.toString() + "}";
    }
}
