package com.yidianling.im.session.extension;

import com.alibaba.fastjson.JSONObject;

/**
 * 请预约咨询时间提醒消息
 * Created by harvie on 2017/1/10.
 */

public class CustomAttachPleaseSubscribeConsultDate extends CustomAttachment {

    private String URL = "url";
    private String TITLE = "title";

    public String url;//跳转url
    public String title;

    public CustomAttachPleaseSubscribeConsultDate() {
        super(CustomAttachmentType.TYPE_PLEASE_SUBSCRIBE_CONSULT_DATE);
    }

    public CustomAttachPleaseSubscribeConsultDate(String url, String title) {
        super(CustomAttachmentType.TYPE_PLEASE_SUBSCRIBE_CONSULT_DATE);
        this.url = url;
        this.title = title;
    }

    @Override
    protected void parseData(JSONObject data) {
        url = data.getString(URL);
        title = data.getString(TITLE);
    }

    @Override
    protected JSONObject packData() {
        JSONObject data = new JSONObject();
        data.put(URL,url);
        data.put(TITLE,title);

        return data;
    }
}
