package org.jk.rag.domain.entity;


import lombok.Builder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.jk.common.mybatis.core.domain.BaseEntity;

/**
 * 智谱知识库列表 bm_knowledge
 *
 * @author takai
 */
@Builder
public class BmKnowledge extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    /** 知识库ID */
    private String knowledgeId;

    /** 知识库绑定的向量化模型 */
    private Integer embeddingId;

    /** 知识库名称 */
    private String name;

    /** 知识库描述 */
    private String description;

    /** 背景颜色 */
    private String background;

    /** 知识库图标 */
    private String icon;

    /** 知识库总字数 */
    private Integer wordNum;

    /** 知识库总大小（字节） */
    private Integer length;

    /** 知识文件数量 */
    private Integer documentSize;

    public String getKnowledgeId() {
        return knowledgeId;
    }

    public void setKnowledgeId(String knowledgeId) {
        this.knowledgeId = knowledgeId;
    }

    public Integer getEmbeddingId() {
        return embeddingId;
    }

    public void setEmbeddingId(Integer embeddingId) {
        this.embeddingId = embeddingId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getBackground() {
        return background;
    }

    public void setBackground(String background) {
        this.background = background;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getWordNum() {
        return wordNum;
    }

    public void setWordNum(Integer wordNum) {
        this.wordNum = wordNum;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }

    public Integer getDocumentSize() {
        return documentSize;
    }

    public void setDocumentSize(Integer documentSize) {
        this.documentSize = documentSize;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("knowledgeId", getKnowledgeId())
            .append("embeddingId", getEmbeddingId())
            .append("name", getName())
            .append("description", getDescription())
            .append("background", getBackground())
            .append("icon", getIcon())
            .append("wordNum", getWordNum())
            .append("length", getLength())
            .append("documentSize", getDocumentSize())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BmKnowledge that = (BmKnowledge) o;

        return knowledgeId.equals(that.knowledgeId);
    }

    @Override
    public int hashCode() {
        return  knowledgeId.hashCode();
    }
}
