package tech.easyflow.ai.entity;

import com.mybatisflex.annotation.Column;
import tech.easyflow.ai.entity.base.BotBase;
import com.mybatisflex.annotation.Table;

import java.util.Map;

/**
 * 实体类。
 *
 * @author michael
 * @since 2024-08-23
 */

@Table("tb_bot")
public class Bot extends BotBase {

    public static final String KEY_SYSTEM_PROMPT = "systemPrompt";
    public static final String KEY_MAX_MESSAGE_COUNT = "maxMessageCount";
    public static final String KEY_ENABLE_DEEP_THINKING = "enableDeepThinking";

    @Column(ignore = true)
    private Boolean approvalPending;

    @Column(ignore = true)
    private String currentApprovalActionType;

    @Column(ignore = true)
    private String displayPublishStatus;

    @Column(ignore = true)
    private String createdByName;

    public boolean isAnonymousEnabled() {
        Map<String, Object> options = getOptions();
        if (options == null) {
            return false;
        }
        Object o = options.get("anonymousEnabled");
        return o != null && (boolean) o;
    }

    public Boolean getApprovalPending() {
        return approvalPending;
    }

    public void setApprovalPending(Boolean approvalPending) {
        this.approvalPending = approvalPending;
    }

    public String getCurrentApprovalActionType() {
        return currentApprovalActionType;
    }

    public void setCurrentApprovalActionType(String currentApprovalActionType) {
        this.currentApprovalActionType = currentApprovalActionType;
    }

    public String getDisplayPublishStatus() {
        return displayPublishStatus;
    }

    public void setDisplayPublishStatus(String displayPublishStatus) {
        this.displayPublishStatus = displayPublishStatus;
    }

    /**
     * 获取创建人展示名称。
     *
     * @return 创建人展示名称
     */
    public String getCreatedByName() {
        return createdByName;
    }

    /**
     * 设置创建人展示名称。
     *
     * @param createdByName 创建人展示名称
     */
    public void setCreatedByName(String createdByName) {
        this.createdByName = createdByName;
    }

}
