package com.ruoyi.message.frequency.goeasymessage.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.vo.UserInfo;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * goeasy消息对象 t_goeasy_message
 *
 * @author liwenlong
 * @date 2024-04-17
 */
@Data
@Accessors(chain = true)
@TableName("t_goeasy_message")
public class GoeasyMessage extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty("删除标志 1正常 删除 3 禁用")
    private Integer delFlag;

    @ApiModelProperty("goeasy返回消息id")
    @Excel(name = "goeasy返回消息id")
    private String messageId;

    @ApiModelProperty("goeasy消息类型")
    @Excel(name = "goeasy消息类型")
    private String type;

    @ApiModelProperty("发送用户")
    @Excel(name = "发送用户")
    private String senderId;

    @ApiModelProperty("发送用户类型 1 用户 ")
    @Excel(name = "发送用户类型 1 用户 ")
    private Integer senderUserType;

    @ApiModelProperty("发送用户id")
    @Excel(name = "发送用户id")
    private Long senderUserId;


    @ApiModelProperty("接收用户")
    @Excel(name = "接收用户")
    private String receiverId;

    @ApiModelProperty("接收用户类型 1 用户 ")
    @Excel(name = "接收用户类型 1 用户 ")
    private Integer receiverUserType;

    @ApiModelProperty("接收用户id")
    @Excel(name = "接收用户id")
    private Long receiverUserId;

    @ApiModelProperty("消息(json字符串)")
    @Excel(name = "消息(json字符串)")
    private String payload;

    @ApiModelProperty("goeasy消息发送时间")
    @Excel(name = "goeasy消息发送时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date goeasyTime;

    @ApiModelProperty("发送用户消息")
    @TableField(exist = false)
    private UserInfo sendUserInfo;

    @ApiModelProperty("接收用户消息")
    @TableField(exist = false)
    private UserInfo receiveUserInfo;

    /**
     * 最早一條消息的时间
     */
    @TableField(exist = false)
    private Date lasttimestamp;

}
