package com.fs.qw.vo;

import com.fs.qw.domain.QWFromUser;
import com.fs.qw.domain.QwMsg;
import lombok.Data;

@Data
public class QwMessageListVO {
    private String id;
    private String status;
    private String type;
    private Long sendTime;
    private String content;
    private String url;
    private Long fileSize;
    private String fileName;
    private Integer fileShowType;
    private String imageUrl;
    private Integer duration; //时长
    private String toContactId;
    private QWFromUser fromUser;

    //获取fromUser
    public  QWFromUser getQwFromUser(Long senderId,QwMsg qwMsg){
        QWFromUser fromUser=new QWFromUser();
        fromUser.setId(senderId);
        if(qwMsg!=null){
            fromUser.setAvatar(qwMsg.getAvatar());
            fromUser.setDisplayName(qwMsg.getAvatar());
        }
        return fromUser;
    }

}
