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-10 18:27:25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ChatMessage对象", description = "聊天消息表")
@TableName("love_chat_message")
public class ChatMessage 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 formUserId;

    @ApiModelProperty(value = "接收人ID")
    private Integer toUserId;

    @ApiModelProperty(value = "发送人")
    @TableField(exist = false)
    private User formUserInfo;

    @ApiModelProperty(value = "接收人")
    @TableField(exist = false)
    private User toUserInfo;

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

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

    @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;

}
