package com.gxwebsoft.love.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * 聊天消息表
 *
 * @author 科技小王子
 * @since 2023-06-15 21:26:48
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ChatConversation对象", description = "聊天消息表")
@TableName("love_chat_conversation")
public class ChatConversation implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    @ApiModelProperty(value = "好友ID")
    private Integer friendId;

    @TableField(exist = false)
    @ApiModelProperty(value = "好友信息")
    private User friendInfo;

    @ApiModelProperty(value = "消息类型")
    private Integer type;

    @ApiModelProperty(value = "消息内容")
    private String content;

    @ApiModelProperty(value = "未读消息")
    private int unRead;

    @ApiModelProperty(value = "状态, 0未读, 1已读")
    private Integer status;

    @ApiModelProperty(value = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "租户id")
    private Integer tenantId;

    @ApiModelProperty(value = "注册时间")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

}
