package com.test.bijihoudaun.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;

/**
 * Markdown文件分块加载响应实体
 * 用于大文件分页加载
 */
@Data
@Schema(name = "Markdown文件分块")
public class MarkdownFileChunk implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "当前块的内容")
    private String chunk;

    @Schema(description = "当前块索引（从0开始）")
    private int chunkIndex;

    @Schema(description = "总块数")
    private int totalChunks;

    @Schema(description = "是否还有更多块")
    private boolean hasMore;

    @Schema(description = "笔记ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long fileId;

    @Schema(description = "笔记标题")
    private String title;

    @Schema(description = "是否私密 0-公开 1-私密")
    private Integer isPrivate;

    @Schema(description = "总字符数")
    private long totalLength;

    @Schema(description = "当前块字符数")
    private int chunkLength;
}
