package tech.easyflow.ai.entity;

import com.mybatisflex.annotation.RelationOneToMany;
import com.mybatisflex.annotation.Table;
import tech.easyflow.ai.entity.base.PluginBase;

import java.util.List;


/**
 *  实体类。
 *
 * @author Administrator
 * @since 2025-04-25
 */
@Table("tb_plugin")
public class Plugin extends PluginBase {

    @RelationOneToMany(selfField = "id", targetField = "pluginId", targetTable = "tb_plugin_item")
    private List<PluginItem> tools;

    @com.mybatisflex.annotation.Column(ignore = true)
    private String workflowTitle;

    @com.mybatisflex.annotation.Column(ignore = true)
    private Boolean available;

    @com.mybatisflex.annotation.Column(ignore = true)
    private String reasonCode;

    @com.mybatisflex.annotation.Column(ignore = true)
    private String reasonMessage;

    @com.mybatisflex.annotation.Column(ignore = true)
    private String createdByName;

    public String getTitle() {
        return this.getName();
    }

    public List<PluginItem> getTools() {
        return tools;
    }

    public void setTools(List<PluginItem> tools) {
        this.tools = tools;
    }

    public String getWorkflowTitle() {
        return workflowTitle;
    }

    public void setWorkflowTitle(String workflowTitle) {
        this.workflowTitle = workflowTitle;
    }

    public Boolean getAvailable() {
        return available;
    }

    public void setAvailable(Boolean available) {
        this.available = available;
    }

    public String getReasonCode() {
        return reasonCode;
    }

    public void setReasonCode(String reasonCode) {
        this.reasonCode = reasonCode;
    }

    public String getReasonMessage() {
        return reasonMessage;
    }

    public void setReasonMessage(String reasonMessage) {
        this.reasonMessage = reasonMessage;
    }

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

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