package com.kingtom.shengtai.app.message.model;

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

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.RelationOneToOne;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 消息接收记录表 实体类。
 *
 * @author wany
 * @since 2023-12-27
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "msg_receive", schema = "public")
public class MsgReceive implements Serializable{

    @Serial
    private static final long serialVersionUID = 8105460224771439655L;

    /**
     * 主键
     */
    @Id
    private String id;

    /**
     * 消息Id
     */
    private String msgId;

    /**
     * 接收人
     */
    private String receiver;

    /**
     * 接收状态
     */
    private Integer receiveState;

    /**
     * 接收时间
     */
    private Date receiveTime;

    /**
     * 阅读状态
     */
    private Integer readState;

    /**
     * 阅读时间
     */
    private Date readTime;

    /**
     * 扩展字段1
     */
    private String ext1;

    /**
     * 扩展字段2
     */
    private String ext2;

    /**
     * 扩展字段3
     */
    private String ext3;

    /**
     * 创建时间
     */
    private Date gmtCreate;

    /**
     * 更新时间
     */
    private Date gmtModified;

    /**
     * 系统ID
     */
    private String sysId;

    @RelationOneToOne(selfField = "msgId", targetField = "id")
    private MsgSummary summary;

}
