package com.yidianling.im.session.extension;

import com.alibaba.fastjson.JSONObject;

/**
 * 自定义提醒消息（短时间内多次私聊，给予提示）本地消息
 * Created by harvie on 2017/1/10.
 */

public class CustomAttachChatTipMsg extends CustomAttachment {
    private static final String KEY_TITLE="from_content";
    private String from_content = "";//提醒内容
    public CustomAttachChatTipMsg() {
        super(0);
    }

    public CustomAttachChatTipMsg(String from_content) {
        super(0);
        this.from_content = from_content;
    }

    @Override
    protected void parseData(JSONObject data) {
        this.from_content=data.getString(KEY_TITLE);
    }

    @Override
    protected JSONObject packData() {
        JSONObject data=new JSONObject();
        data.put(KEY_TITLE,from_content);
        return data;
    }

    public String getFrom_content() {
        return from_content;
    }

    public void setFrom_content(String from_content) {
        this.from_content = from_content;
    }
}
