package com.fs.qw.domain;

import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

public class QwConversation extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long id;

    /** 设备id */
    @Excel(name = "设备id")
    private String deviceId;

    /** 会话id 若是单聊组成形式 sender_id+receiver_id升序组合md5字符串 若是群聊取roomId */
    @Excel(name = "会话id 若是单聊组成形式 sender_id+receiver_id升序组合md5字符串 若是群聊取roomId")
    private String conversationId;

    /** 最后消息id */
    @Excel(name = "最后消息id")
    private Long lastMessageId;

    /** 会话类型  0单聊  1群聊 */
    @Excel(name = "会话类型  0单聊  1群聊")
    private Long type;

    /** sender_id,receive_id  如 sender_id=1 receive_id=2  取值 1,2 */
    @Excel(name = "sender_id,receive_id  如 sender_id=1 receive_id=2  取值 1,2")
    private String ancestors;

    /** 会话拓展属性 */
    @Excel(name = "会话拓展属性")
    private String ext;

    /** 会话未读消息数量 */
    @Excel(name = "会话未读消息数量")
    private Long unreadNum;

    private Long homeUserId;

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

    public Long getId()
    {
        return id;
    }
    public void setDeviceId(String deviceId)
    {
        this.deviceId = deviceId;
    }

    public String getDeviceId()
    {
        return deviceId;
    }
    public void setConversationId(String conversationId)
    {
        this.conversationId = conversationId;
    }

    public String getConversationId()
    {
        return conversationId;
    }
    public void setLastMessageId(Long lastMessageId)
    {
        this.lastMessageId = lastMessageId;
    }

    public Long getLastMessageId()
    {
        return lastMessageId;
    }
    public void setType(Long type)
    {
        this.type = type;
    }

    public Long getType()
    {
        return type;
    }
    public void setAncestors(String ancestors)
    {
        this.ancestors = ancestors;
    }

    public String getAncestors()
    {
        return ancestors;
    }
    public void setExt(String ext)
    {
        this.ext = ext;
    }

    public String getExt()
    {
        return ext;
    }
    public void setUnreadNum(Long unreadNum)
    {
        this.unreadNum = unreadNum;
    }

    public Long getUnreadNum()
    {
        return unreadNum;
    }

    public Long getHomeUserId() {
        return homeUserId;
    }

    public void setHomeUserId(Long homeUserId) {
        this.homeUserId = homeUserId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("deviceId", getDeviceId())
                .append("conversationId", getConversationId())
                .append("lastMessageId", getLastMessageId())
                .append("type", getType())
                .append("ancestors", getAncestors())
                .append("ext", getExt())
                .append("unreadNum", getUnreadNum())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("homeUserId",getHomeUserId())
                .toString();
    }
}
