package com.zsc.edu.gateway.modules.message.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户消息
 *
 * @author harry_yao
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_user_notice")
public class UserNotice implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    public Long userId;


    /**
     * 消息ID
     */
    public Long noticeId;


    /**
     * 是否已读
     */
    public Boolean isRead;

    /**
     * 阅读时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public LocalDateTime readTime;

}
