package com.ym.mec.common.entity;

import com.alibaba.fastjson.JSONObject;

public class ImTxtMessage{
    private String messageContent;
    private String extra;
    private String name;
    private Long size;
    private String fileUrl;
    private String type;

    public ImTxtMessage(String messageContent, String extra) {
        this.type = "RC:TxtMsg";
        this.messageContent = messageContent;
        this.extra = extra;
    }

    public ImTxtMessage(String messageContent, String extra, String fileUrl) {
        this.type = "RC:ImgMsg";
        this.messageContent = messageContent;
        this.extra = extra;
        this.fileUrl = fileUrl;
    }

    public ImTxtMessage(String name, Long size, String fileUrl, String extra) {
        this.type = "RC:FileMsg";
        this.name = name;
        this.size = size;
        this.fileUrl = fileUrl;
        this.extra = extra;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public String getMessageContent() {
        return messageContent;
    }

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public String getExtra() {
        return this.extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
