package cn.bunny.vo.system.user;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UserMessageVo {
    // 自增ID
    private Integer messageId;
    // 接收人用户ID
    private String receivedUserId;
    // 文章ID
    private String articleId;
    // 文章标题
    private String articleTitle;
    // 评论ID
    private Integer commentId;
    // 发送人用户ID
    private String sendUserId;
    // 发送人昵称
    private String sendNickName;
    // sys:系统消息    reply:评论    likePost:文章点赞    likeComment:评论点赞    attachment:附件下载
    private String messageType;
    // 消息内容
    private String messageContent;
    // 创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createTime;
}
