CustomAttachSubScriptTime.java 796 Bytes
Newer Older
konghaorui committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
package com.yidianling.im.session.extension;

import com.alibaba.fastjson.JSONObject;

/**
 * 添加预约时间
 * Created by harvie on 2017/1/10.
 */

public class CustomAttachSubScriptTime extends CustomAttachment {

    private String TITLE = "title";

    private String title;

    public CustomAttachSubScriptTime() {
        super(CustomAttachmentType.ADD_SUBSCRIPT_TIME);
    }

    public CustomAttachSubScriptTime(String title) {
        super(CustomAttachmentType.ADD_SUBSCRIPT_TIME);
        this.title = title;
    }

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

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