
package com.tmerclub.cloud.im.vo;

import lombok.Data;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 最后的对话信息列表项
 *
 * @author tmerclub
 * @date 2020/8/18
 */
@Data
@ToString
public class ConversationVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 聊天类型
     */
    private Integer chatType;

    /**
     * 商家id
     */
    private Long shopId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 好友头像
     */
    private String pic;

    /**
     * 好友昵称
     */
    private String friendName;

    /**
     * 最新一条消息内容
     */
    private String latestMsg;

    /**
     * 未读消息计数
     */
    private Integer unread;

    /**
     * 最新消息的时间戳
     */
    private Long timestamp;

    /**
     * 最新消息的时间
     */
    private String timeStr;

    /**
     * 最后的消息时间
     */
    private LocalDateTime latestMsgTime;

    /**
     * 消息类型
     */
    private Integer type;

    /**
     * 店铺状态(-1:未开通 0: 停业中 1:营业中)，可修改
     */
    private Integer shopStatus;

    /**
     * 员工id
     */
    private Long employeeId;

    /**
     * 是否在线
     */
    private Boolean isOnline;

    public Integer getChatType() {
        return chatType;
    }

    public void setChatType(Integer chatType) {
        this.chatType = chatType;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getFriendName() {
        return friendName;
    }

    public void setFriendName(String friendName) {
        this.friendName = friendName;
    }

    public String getLatestMsg() {
        return latestMsg;
    }

    public void setLatestMsg(String latestMsg) {
        this.latestMsg = latestMsg;
    }

    public Integer getUnread() {
        return unread;
    }

    public void setUnread(Integer unread) {
        this.unread = unread;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public String getTimeStr() {
        return timeStr;
    }

    public void setTimeStr(String timeStr) {
        this.timeStr = timeStr;
    }

    public LocalDateTime getLatestMsgTime() {
        return latestMsgTime;
    }

    public void setLatestMsgTime(LocalDateTime latestMsgTime) {
        this.latestMsgTime = latestMsgTime;
    }

    public Integer getType() {
        return type;
    }

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

    public Integer getShopStatus() {
        return shopStatus;
    }

    public void setShopStatus(Integer shopStatus) {
        this.shopStatus = shopStatus;
    }

    public Long getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Long employeeId) {
        this.employeeId = employeeId;
    }

    public Boolean getIsOnline() {
        return isOnline;
    }

    public void setIsOnline(Boolean isOnline) {
        this.isOnline = isOnline;
    }

    @Override
    public String toString() {
        return "ConversationVO{" +
                "chatType=" + chatType +
                ", shopId=" + shopId +
                ", userId='" + userId + '\'' +
                ", pic='" + pic + '\'' +
                ", friendName='" + friendName + '\'' +
                ", latestMsg='" + latestMsg + '\'' +
                ", unread=" + unread +
                ", timestamp=" + timestamp +
                ", timeStr='" + timeStr + '\'' +
                ", latestMsgTime=" + latestMsgTime +
                ", type=" + type +
                ", shopStatus=" + shopStatus +
                ", employeeId=" + employeeId +
                ", isOnline=" + isOnline +
                '}';
    }
}
