package com.yidianling.im.session.extension;

import com.alibaba.fastjson.JSONObject;

public class CustomAttachLingxiFirstQuestion extends CustomAttachment {


    private final String GREETIMAGE = "greetImage";//图片
    private final String GREETVIDEO = "greetVideo";//视频
    private final String GREETURL = "greetUrl";//url链接


    public String greetImage;
    public String greetVideo;
    public String greetUrl;

    public CustomAttachLingxiFirstQuestion() {
        super(CustomAttachmentType.TYPE_LINGXI_FIRST_QUESTION);
    }

    @Override
    protected void parseData(JSONObject data) {
        this.greetImage = data.getString(GREETIMAGE);
        this.greetVideo = data.getString(GREETVIDEO);
        this.greetUrl = data.getString(GREETURL);

    }

    @Override
    protected JSONObject packData() {
        JSONObject data = new JSONObject();
        data.put(GREETIMAGE, greetImage);
        data.put(GREETVIDEO, greetVideo);
        data.put(GREETURL, GREETURL);
        return data;
    }
}
