package cn.ezhizao.project.business.message.domain;

import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 消息队列对象 biz_message
 *
 * @author ezhizao
 * @date 2024-07-03
 */
@Data
@TableName(value = "biz_message")
public class BizMessage
{
    private static final long serialVersionUID = 1L;

    /* 主键 */
    private Long id;

    /** 消息 */
    @Excel(name = "消息")
    @ApiModelProperty(value = "消息")
    private String message;

    /** 来源id */
    @ApiModelProperty(value = "消息")
    private Long fromUserId;

    @TableField(exist = false)
    private String fromUserName;
    @TableField(exist = false)
    private String fromNickName;

    /** 去向id */
    @ApiModelProperty(value = "消息")
    private Long toUserId;

    @TableField(exist = false)
    private String toUserName;
    @TableField(exist = false)
    private String toNickName;

    /** 发信时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发信时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "发信时间")
    private Date messageDate;

    private Date readTime;
    private Integer msgRead;

    @TableField(exist = false)
    private List<Long> ids = new ArrayList<>();
}
