package com.infoepoch.pms.agent.platform.agent.domain.irepository;

import com.infoepoch.pms.agent.common.utils.AbstractCriteria;

/**
 * @author jiangyz
 * @date 2026/4/17 15:49
 * 智能体定义表查询条件类
 */
public class AgentCriteria extends AbstractCriteria {

    //region 智能体名称
    public boolean byName() {
        return this.andMap.containsKey("Name");
    }

    private String name;

    public String getName() {
        if (byName())
            return name;
        return null;
    }

    public void setName(String value) {
        this.name = value;
        this.andMap.put("Name", value);
    }
    //endregion

    //region 智能体名称模糊查询
    public boolean byNameContain() {
        return this.andMap.containsKey("NameContain");
    }

    private String nameContain;

    public String getNameContain() {
        if (byNameContain())
            return nameContain;
        return null;
    }

    public void setNameContain(String value) {
        this.nameContain = value;
        this.andMap.put("NameContain", value);
    }
    //endregion

    //region 指定模型配置，为空则使用全局默认模型
    public boolean byModelConfigId() {
        return this.andMap.containsKey("ModelConfigId");
    }

    private String modelConfigId;

    public String getModelConfigId() {
        if (byModelConfigId())
            return modelConfigId;
        return null;
    }

    public void setModelConfigId(String value) {
        this.modelConfigId = value;
        this.andMap.put("ModelConfigId", value);
    }
    //endregion

    //region 是否启用
    public boolean byEnabled() {
        return this.andMap.containsKey("Enabled");
    }

    private Boolean enabled;

    public Boolean getEnabled() {
        if (byEnabled())
            return enabled;
        return null;
    }

    public void setEnabled(Boolean value) {
        this.enabled = value;
        this.andMap.put("Enabled", value);
    }
    //endregion

}