package org.jk.rag.domain;

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

/**
 * 智谱应用列表 bm_application
 *
 * @author takai
 */
@Data
@Builder
public class BmApplication extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    /** 应用ID */
    private String appId;

    /** 应用名称 */
    private String name;

    /** 应用描述 */
    private String desc;

    /** 模版 */
    private String prompt;

    /** 采样温度的另一种方式 */
    private String topP;

    /** 采样温度 */
    private String temperature;

    /** 知识库id列表 */
    private String knowledgeIds;

    /** 分片数量 */
    private Integer sliceCount;

    /** model */
    private String model;

    /** icon_color */
    private String iconColor;

    /** icon_type */
    private String iconType;

    /** max_token */
    private Integer maxToken;

    private String knowledgeInfo;

    private String visible;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("appId", getAppId())
            .append("name", getName())
            .append("desc", getDesc())
            .append("prompt", getPrompt())
            .append("topP", getTopP())
            .append("temperature", getTemperature())
            .append("knowledgeIds", getKnowledgeIds())
            .append("sliceCount", getSliceCount())
            .append("model", getModel())
            .append("iconColor", getIconColor())
            .append("iconType", getIconType())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("maxToken", getMaxToken())
            .append("knowledgeInfo", getKnowledgeInfo())
            .toString();
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BmApplication that = (BmApplication) o;

        return appId.equals(that.appId);
    }

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