package com.example.leudaemialikeme.Model;

import com.example.leudaemialikeme.service.WebSocketClient;

import org.litepal.crud.LitePalSupport;

public class Message extends LitePalSupport {
    private int id;
    private int senderNetId;
    private int receiverNetId;
    private String content;
    private int messageType;
    private long createTime;
    private int flag;

    public Message() {
        super();
    }

    public Message(int senderNetId, int receiverNetId, String content) {
        this.senderNetId = senderNetId;
        this.receiverNetId = receiverNetId;
        this.content = content;
        this.flag = 0;
        this.createTime = System.currentTimeMillis();
        this.messageType = WebSocketClient.MSG_TEXT;
    }

    public Message(int senderNetId, int receiverNetId, String content, int messageType) {
        this.senderNetId = senderNetId;
        this.receiverNetId = receiverNetId;
        this.content = content;
        this.messageType = messageType;
        this.flag = 0;
        this.createTime = System.currentTimeMillis();
    }

    public Message(int senderNetId, int receiverNetId, int messageType, String content, long createTime) {
        this.senderNetId = senderNetId;
        this.receiverNetId = receiverNetId;
        this.messageType = messageType;
        this.content = content;
        this.createTime = createTime;
        this.flag = 0;
    }

    public int getMessageType() {
        return messageType;
    }

    public void setMessageType(int messageType) {
        this.messageType = messageType;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getSenderNetId() {
        return senderNetId;
    }

    public void setSenderNetId(int senderNetId) {
        this.senderNetId = senderNetId;
    }

    public int getReceiverNetId() {
        return receiverNetId;
    }

    public void setReceiverNetId(int receiverNetId) {
        this.receiverNetId = receiverNetId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }


}
