package cn.axzo.msg.center.message.service.card;

import com.alibaba.fastjson.JSONObject;

import javax.validation.constraints.NotNull;

/**
 * @author yanglin
 */
public class CardExtInfo {

    private final JSONObject extInfo;

    public CardExtInfo(JSONObject bizParam) {
        JSONObject extInfo = bizParam.getJSONObject("extInfo");
        if (extInfo == null) {
            extInfo = new JSONObject();
            bizParam.put("extInfo", extInfo);
        }
        this.extInfo = extInfo;
    }

    public void addExtInfo(String key, Object value) {
        extInfo.put(key, value);
    }

    @NotNull
    public JSONObject getJsonObject() {
        return extInfo;
    }

}