package tech.easyflow.ai.entity.base;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.core.handler.FastjsonTypeHandler;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.Map;
import tech.easyflow.common.entity.DateEntity;


public class DocumentBase extends DateEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Generator, value = "snowFlakeId")
    private BigInteger id;

    /**
     * 知识库ID
     */
    @Column(comment = "知识库ID")
    private BigInteger collectionId;

    /**
     * 文档类型 pdf/word/aieditor 等
     */
    @Column(comment = "文档类型 pdf/word/aieditor 等")
    private String documentType;

    /**
     * 文档路径
     */
    @Column(comment = "文档路径")
    private String documentPath;

    /**
     * 标题
     */
    @Column(comment = "标题")
    private String title;

    /**
     * 内容
     */
    @Column(comment = "内容")
    private String content;

    /**
     * 内容类型
     */
    @Column(comment = "内容类型")
    private String contentType;

    /**
     * URL 别名
     */
    @Column(comment = "URL 别名")
    private String slug;

    /**
     * 排序序号
     */
    @Column(comment = "排序序号")
    private Integer orderNo;

    /**
     * 其他配置项
     */
    @Column(typeHandler = FastjsonTypeHandler.class, comment = "其他配置项")
    private Map<String, Object> options;

    /**
     * 处理状态
     */
    @Column(comment = "处理状态")
    private String processStatus;

    /**
     * 总分块数
     */
    @Column(comment = "总分块数")
    private Integer totalChunks;

    /**
     * 已完成分块数
     */
    @Column(comment = "已完成分块数")
    private Integer completedChunks;

    /**
     * 失败分块数
     */
    @Column(comment = "失败分块数")
    private Integer failedChunks;

    /**
     * 处理进度百分比
     */
    @Column(comment = "处理进度百分比")
    private Integer progressPercent;

    /**
     * 最近任务错误摘要
     */
    @Column(comment = "最近任务错误摘要")
    private String lastTaskError;

    /**
     * 任务状态更新时间
     */
    @Column(comment = "任务状态更新时间")
    private Date taskModifiedAt;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private Date created;

    /**
     * 创建人ID
     */
    @Column(comment = "创建人ID")
    private BigInteger createdBy;

    /**
     * 最后的修改时间
     */
    @Column(comment = "最后的修改时间")
    private Date modified;

    /**
     * 最后的修改人的ID
     */
    @Column(comment = "最后的修改人的ID")
    private BigInteger modifiedBy;

    public BigInteger getId() {
        return id;
    }

    public void setId(BigInteger id) {
        this.id = id;
    }

    public BigInteger getCollectionId() {
        return collectionId;
    }

    public void setCollectionId(BigInteger collectionId) {
        this.collectionId = collectionId;
    }

    public String getDocumentType() {
        return documentType;
    }

    public void setDocumentType(String documentType) {
        this.documentType = documentType;
    }

    public String getDocumentPath() {
        return documentPath;
    }

    public void setDocumentPath(String documentPath) {
        this.documentPath = documentPath;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getSlug() {
        return slug;
    }

    public void setSlug(String slug) {
        this.slug = slug;
    }

    public Integer getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(Integer orderNo) {
        this.orderNo = orderNo;
    }

    public Map<String, Object> getOptions() {
        return options;
    }

    public void setOptions(Map<String, Object> options) {
        this.options = options;
    }

    public String getProcessStatus() {
        return processStatus;
    }

    public void setProcessStatus(String processStatus) {
        this.processStatus = processStatus;
    }

    public Integer getTotalChunks() {
        return totalChunks;
    }

    public void setTotalChunks(Integer totalChunks) {
        this.totalChunks = totalChunks;
    }

    public Integer getCompletedChunks() {
        return completedChunks;
    }

    public void setCompletedChunks(Integer completedChunks) {
        this.completedChunks = completedChunks;
    }

    public Integer getFailedChunks() {
        return failedChunks;
    }

    public void setFailedChunks(Integer failedChunks) {
        this.failedChunks = failedChunks;
    }

    public Integer getProgressPercent() {
        return progressPercent;
    }

    public void setProgressPercent(Integer progressPercent) {
        this.progressPercent = progressPercent;
    }

    public String getLastTaskError() {
        return lastTaskError;
    }

    public void setLastTaskError(String lastTaskError) {
        this.lastTaskError = lastTaskError;
    }

    public Date getTaskModifiedAt() {
        return taskModifiedAt;
    }

    public void setTaskModifiedAt(Date taskModifiedAt) {
        this.taskModifiedAt = taskModifiedAt;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public BigInteger getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(BigInteger createdBy) {
        this.createdBy = createdBy;
    }

    public Date getModified() {
        return modified;
    }

    public void setModified(Date modified) {
        this.modified = modified;
    }

    public BigInteger getModifiedBy() {
        return modifiedBy;
    }

    public void setModifiedBy(BigInteger modifiedBy) {
        this.modifiedBy = modifiedBy;
    }

}
