package cn.bunny.vo.system.article;

import cn.bunny.vo.file.FileInfoVo;
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.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ForumArticleVo {
    // 文章ID
    private Long id;
    // 板块ID
    private Integer boardId;
    // 父级板块ID
    private Integer pBoardId;
    // 板块名称
    private String boardName;
    // 父板块名称
    private String pBoardName;
    // 用户ID
    private String userId;
    // 昵称
    private String nickName;
    // 最后登录ip地址
    private String userIpAddress;
    // 标题
    private String title;
    // 封面
    private String cover;
    // 内容
    private String content;
    // 0:富文本编辑器 1:markdown编辑器
    private Byte editorType;
    // 摘要
    private String summary;
    // 发布时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private String createTime;
    // 最后更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private String updateTime;
    // 阅读数量
    private Integer readCount;
    // 点赞数
    private Integer goodCount;
    // 评论数
    private Integer commentCount;
    // 0未置顶  1:已置顶
    private Byte topType;
    // 0:没有附件  1:有附件
    private Byte attachmentType;
    // -1已删除 0:待审核  1:已审核
    private Byte status;
    private List<FileInfoVo> fileInfo;
}
